Changeset da81b849 for benchmark/io/sendfile/consumer.c
- Timestamp:
- Feb 14, 2022, 7:57:01 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- ef6d059
- Parents:
- 8761d40a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/sendfile/consumer.c
r8761d40a rda81b849 37 37 case 1: break; 38 38 case 2: 39 { 40 const char * const str = argv[1]; 41 char* endptr; 42 unsigned long long ret = strtoul(str, &endptr, 10); 43 if('\0' != *endptr) { fprintf( stderr, "Invalid argument \"%s\" (not a number)\n", str ); goto USAGE;} 44 if(errno == ERANGE || ret > 65535) { fprintf( stderr, "Invalid argument \"%s\" (value too large)\n", str ); goto USAGE;} 45 46 port = ret; 47 break; 48 } 49 USAGE: 39 50 default: 40 fprintf( stderr, "USAGE: %s [port] ", argv[0] );51 fprintf( stderr, "USAGE: %s [port]\n", argv[0] ); 41 52 exit( USAGE_ERROR ); 42 53 }
Note: See TracChangeset
for help on using the changeset viewer.