[Client] Use strtoul() instead of strtol()
This commit is contained in:
parent
8123ee3096
commit
60fe0061be
|
@ -136,18 +136,19 @@ void parse_main_options(int argc, char **argv)
|
|||
else
|
||||
{
|
||||
// Take the optind value:
|
||||
options.listening_port = strtol(argv[optind], NULL, 0) ;
|
||||
options.listening_port =
|
||||
strtoul(argv[optind], NULL, 0) ;
|
||||
optind++ ;
|
||||
}
|
||||
}
|
||||
else // We got an option like -l<port>, it's OK
|
||||
options.listening_port = strtol(optarg, NULL, 0) ;
|
||||
options.listening_port = strtoul(optarg, NULL, 0) ;
|
||||
break ;
|
||||
case 'n' :
|
||||
options.nb_pkt = strtol(optarg, NULL, 0) ;
|
||||
options.nb_pkt = strtoul(optarg, NULL, 0) ;
|
||||
break ;
|
||||
case 'p' :
|
||||
options.dest_port = strtol(optarg, NULL, 0) ;
|
||||
options.dest_port = strtoul(optarg, NULL, 0) ;
|
||||
break ;
|
||||
case 't' :
|
||||
options.delay = strtol(optarg, NULL, 0) ;
|
||||
|
@ -183,7 +184,7 @@ void parse_calibration_data(int argc, char **argv)
|
|||
if (argc - optind == 4)
|
||||
{
|
||||
is_calibration_request = TRUE ;
|
||||
options.direction = strtol(argv[optind++], NULL, 0) ;
|
||||
options.direction = strtoul(argv[optind++], NULL, 0) ;
|
||||
options.x = strtod(argv[optind++], NULL) ;
|
||||
options.y = strtod(argv[optind++], NULL) ;
|
||||
options.z = strtod(argv[optind], NULL) ;
|
||||
|
|
Loading…
Reference in New Issue