Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
djw8605 and github-actions[bot] authored Oct 2, 2023
1 parent e9098de commit e334259
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions test/asynch.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/select.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

#include "../src/scitokens.h"

void
Expand All @@ -13,26 +13,25 @@ usage( const char * self ) {
}

void
print_claim( SciToken & token, const char * claim ) {
char * value;
char * error;
int rv = scitoken_get_claim_string(
token, claim, & value, & error
);
if( rv != 0 ) {
fprintf( stderr, "scitoken_get_claim_string('%s') failed: %s\n", claim, error );
// exit( -2 );
void print_claim(SciToken &token, const char *claim) {
char *value;
char *error;
int rv = scitoken_get_claim_string(token, claim, &value, &error);
if (rv != 0) {
fprintf(stderr, "scitoken_get_claim_string('%s') failed: %s\n", claim,
error);
return;
}
fprintf( stdout, "%s = %s\n", claim, value );
}


int
main( int argc, char ** argv) {
if( argc < 2 ) { usage(argv[0]); exit(-1); }
const char * encoded = argv[1];

int main(int argc, char **argv) {
if (argc < 2) {
usage(argv[0]);
exit(-1);
}
const char *encoded = argv[1];
int rv;
char * error;
SciToken token;
Expand Down

0 comments on commit e334259

Please sign in to comment.