aboutsummaryrefslogtreecommitdiff
path: root/libbb/getopt32.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2011-08-10 00:51:29 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-08-10 00:51:29 +0200
commitb47b3ce1bd651c689fae3cac2760f43f453e2b6e (patch)
tree792a1710799fbf57c66fa51a642ae6d5074640c5 /libbb/getopt32.c
parentb347df91317ca05910e930c94fdba30baf9e2de8 (diff)
downloadbusybox-w32-b47b3ce1bd651c689fae3cac2760f43f453e2b6e.tar.gz
busybox-w32-b47b3ce1bd651c689fae3cac2760f43f453e2b6e.tar.bz2
busybox-w32-b47b3ce1bd651c689fae3cac2760f43f453e2b6e.zip
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/getopt32.c')
-rw-r--r--libbb/getopt32.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index c7c4079c2..d0e83d88e 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -467,13 +467,17 @@ getopt32(char **argv, const char *applet_opts, ...)
467 } 467 }
468 for (on_off = complementary; on_off->opt_char; on_off++) 468 for (on_off = complementary; on_off->opt_char; on_off++)
469 if (on_off->opt_char == *s) 469 if (on_off->opt_char == *s)
470 break; 470 goto found_opt;
471 /* Without this, diagnostic of such bugs is not easy */
472 bb_error_msg_and_die("NO OPT %c!", *s);
473 found_opt:
471 if (c == ':' && s[2] == ':') { 474 if (c == ':' && s[2] == ':') {
472 on_off->param_type = PARAM_LIST; 475 on_off->param_type = PARAM_LIST;
473 continue; 476 continue;
474 } 477 }
475 if (c == '+' && (s[2] == ':' || s[2] == '\0')) { 478 if (c == '+' && (s[2] == ':' || s[2] == '\0')) {
476 on_off->param_type = PARAM_INT; 479 on_off->param_type = PARAM_INT;
480 s++;
477 continue; 481 continue;
478 } 482 }
479 if (c == ':' || c == '\0') { 483 if (c == ':' || c == '\0') {