[ARDrone] Fix parsing of option -l
This commit is contained in:
parent
fe8846cca9
commit
c079ee14ca
|
@ -494,11 +494,6 @@ void parse_main_options(int argc, char **argv)
|
||||||
options.listening_port = strtoul(optarg, NULL, 0) ;
|
options.listening_port = strtoul(optarg, NULL, 0) ;
|
||||||
else // We got -l alone or -l <port>
|
else // We got -l alone or -l <port>
|
||||||
{
|
{
|
||||||
/* If we are at the end of the string, or the next optind
|
|
||||||
* is an option, we have -l without a port number */
|
|
||||||
optind++ ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If we are at the end of the string, or the next optind
|
/* If we are at the end of the string, or the next optind
|
||||||
* is an option, we have -l without a port number */
|
* is an option, we have -l without a port number */
|
||||||
if (argv[optind] == NULL || argv[optind][0] == '-')
|
if (argv[optind] == NULL || argv[optind][0] == '-')
|
||||||
|
@ -511,7 +506,8 @@ void parse_main_options(int argc, char **argv)
|
||||||
strtoul(argv[optind], NULL, 0) ;
|
strtoul(argv[optind], NULL, 0) ;
|
||||||
optind++ ;
|
optind++ ;
|
||||||
}
|
}
|
||||||
break ;
|
}
|
||||||
|
break ;
|
||||||
case 'n' :
|
case 'n' :
|
||||||
options.nb_pkt = strtoul(optarg, NULL, 0) ;
|
options.nb_pkt = strtoul(optarg, NULL, 0) ;
|
||||||
break ;
|
break ;
|
||||||
|
|
Loading…
Reference in New Issue