From c079ee14ca507330f843a6ad79d70e1eb18f4b1c Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Thu, 18 Aug 2011 10:43:38 +0200 Subject: [PATCH] [ARDrone] Fix parsing of option -l --- owlps-ardrone/owlps-drone.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/owlps-ardrone/owlps-drone.c b/owlps-ardrone/owlps-drone.c index 84c2df6..473dc33 100644 --- a/owlps-ardrone/owlps-drone.c +++ b/owlps-ardrone/owlps-drone.c @@ -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 { - /* 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 ;