aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Fomenko <ext-alexey.fomenko@nokia.com>2011-03-01 19:25:49 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2011-03-01 19:25:49 +0100
commitea6116ee59af0945f4a6ac9ede984930a0ede429 (patch)
tree83e00b14ba3dde9ffec8a7011fdecd611bafd11d
parent5e29e263888284b2451debd9e5cb138b48fd293a (diff)
downloadbusybox-w32-ea6116ee59af0945f4a6ac9ede984930a0ede429.tar.gz
busybox-w32-ea6116ee59af0945f4a6ac9ede984930a0ede429.tar.bz2
busybox-w32-ea6116ee59af0945f4a6ac9ede984930a0ede429.zip
libbb: remove dead code in getopt32. -7 bytes
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--libbb/getopt32.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index f3f1cfcba..18f33c704 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -542,8 +542,6 @@ getopt32(char **argv, const char *applet_opts, ...)
542#endif 542#endif
543 /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */ 543 /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */
544 544
545 pargv = NULL;
546
547 /* Note: just "getopt() <= 0" will not work well for 545 /* Note: just "getopt() <= 0" will not work well for
548 * "fake" short options, like this one: 546 * "fake" short options, like this one:
549 * wget $'-\203' "Test: test" http://kernel.org/ 547 * wget $'-\203' "Test: test" http://kernel.org/
@@ -574,19 +572,16 @@ getopt32(char **argv, const char *applet_opts, ...)
574 flags ^= trigger; 572 flags ^= trigger;
575 if (on_off->counter) 573 if (on_off->counter)
576 (*(on_off->counter))++; 574 (*(on_off->counter))++;
577 if (on_off->param_type == PARAM_LIST) { 575 if (optarg) {
578 if (optarg) 576 if (on_off->param_type == PARAM_LIST) {
579 llist_add_to_end((llist_t **)(on_off->optarg), optarg); 577 llist_add_to_end((llist_t **)(on_off->optarg), optarg);
580 } else if (on_off->param_type == PARAM_INT) { 578 } else if (on_off->param_type == PARAM_INT) {
581 if (optarg)
582//TODO: xatoi_positive indirectly pulls in printf machinery 579//TODO: xatoi_positive indirectly pulls in printf machinery
583 *(unsigned*)(on_off->optarg) = xatoi_positive(optarg); 580 *(unsigned*)(on_off->optarg) = xatoi_positive(optarg);
584 } else if (on_off->optarg) { 581 } else if (on_off->optarg) {
585 if (optarg)
586 *(char **)(on_off->optarg) = optarg; 582 *(char **)(on_off->optarg) = optarg;
583 }
587 } 584 }
588 if (pargv != NULL)
589 break;
590 } 585 }
591 586
592 /* check depending requires for given options */ 587 /* check depending requires for given options */