[ARDrone] Fix parsing of option -l

This commit is contained in:
Matteo Cypriani 2011-08-18 10:43:38 +02:00
parent fe8846cca9
commit c079ee14ca
1 changed files with 2 additions and 6 deletions

View File

@ -494,11 +494,6 @@ void parse_main_options(int argc, char **argv)
options.listening_port = strtoul(optarg, NULL, 0) ;
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
* is an option, we have -l without a port number */
if (argv[optind] == NULL || argv[optind][0] == '-')
@ -511,7 +506,8 @@ void parse_main_options(int argc, char **argv)
strtoul(argv[optind], NULL, 0) ;
optind++ ;
}
break ;
}
break ;
case 'n' :
options.nb_pkt = strtoul(optarg, NULL, 0) ;
break ;