diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-18 15:32:12 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-18 15:32:12 +0000 |
commit | fe7cd642b0b732f5d41403c2f6983ad676b69dd9 (patch) | |
tree | e5962885cb72c976f44b178a350a92ba5f1aa02d /procps | |
parent | d6cd9d7fe9eab19a9e36fdda729c78c40205b1e5 (diff) | |
download | busybox-w32-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.tar.gz busybox-w32-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.tar.bz2 busybox-w32-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.zip |
don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
text data bss dec hex filename
773469 1058 11092 785619 bfcd3 busybox_old
772644 1058 11092 784794 bf99a busybox_unstripped
Diffstat (limited to 'procps')
-rw-r--r-- | procps/pidof.c | 2 | ||||
-rw-r--r-- | procps/ps.c | 6 | ||||
-rw-r--r-- | procps/top.c | 2 | ||||
-rw-r--r-- | procps/watch.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/procps/pidof.c b/procps/pidof.c index 01e587cbf..c989076bb 100644 --- a/procps/pidof.c +++ b/procps/pidof.c | |||
@@ -28,7 +28,7 @@ int pidof_main(int argc, char **argv) | |||
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | /* do unconditional option parsing */ | 30 | /* do unconditional option parsing */ |
31 | opt = getopt32(argc, argv, "" | 31 | opt = getopt32(argv, "" |
32 | USE_FEATURE_PIDOF_SINGLE ("s") | 32 | USE_FEATURE_PIDOF_SINGLE ("s") |
33 | USE_FEATURE_PIDOF_OMIT("o:", &omits)); | 33 | USE_FEATURE_PIDOF_OMIT("o:", &omits)); |
34 | 34 | ||
diff --git a/procps/ps.c b/procps/ps.c index 5150a08a2..805fe0615 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -297,7 +297,7 @@ int ps_main(int argc, char **argv) | |||
297 | // Select which columns to display | 297 | // Select which columns to display |
298 | /* We allow (and ignore) most of the above. FIXME */ | 298 | /* We allow (and ignore) most of the above. FIXME */ |
299 | opt_complementary = "o::"; | 299 | opt_complementary = "o::"; |
300 | USE_SELINUX(opt =) getopt32(argc, argv, "Zo:aAdefl", &opt_o); | 300 | USE_SELINUX(opt =) getopt32(argv, "Zo:aAdefl", &opt_o); |
301 | if (opt_o) { | 301 | if (opt_o) { |
302 | do { | 302 | do { |
303 | parse_o(opt_o->data); | 303 | parse_o(opt_o->data); |
@@ -357,7 +357,7 @@ int ps_main(int argc, char **argv) | |||
357 | #if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX | 357 | #if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX |
358 | #if ENABLE_FEATURE_PS_WIDE | 358 | #if ENABLE_FEATURE_PS_WIDE |
359 | opt_complementary = "-:ww"; | 359 | opt_complementary = "-:ww"; |
360 | USE_SELINUX(i =) getopt32(argc, argv, USE_SELINUX("Z") "w", &w_count); | 360 | USE_SELINUX(i =) getopt32(argv, USE_SELINUX("Z") "w", &w_count); |
361 | /* if w is given once, GNU ps sets the width to 132, | 361 | /* if w is given once, GNU ps sets the width to 132, |
362 | * if w is given more than once, it is "unlimited" | 362 | * if w is given more than once, it is "unlimited" |
363 | */ | 363 | */ |
@@ -370,7 +370,7 @@ int ps_main(int argc, char **argv) | |||
370 | terminal_width = MAX_WIDTH; | 370 | terminal_width = MAX_WIDTH; |
371 | } | 371 | } |
372 | #else /* only ENABLE_SELINUX */ | 372 | #else /* only ENABLE_SELINUX */ |
373 | i = getopt32(argc, argv, "Z"); | 373 | i = getopt32(argv, "Z"); |
374 | #endif | 374 | #endif |
375 | #if ENABLE_SELINUX | 375 | #if ENABLE_SELINUX |
376 | if ((i & 1) && is_selinux_enabled()) | 376 | if ((i & 1) && is_selinux_enabled()) |
diff --git a/procps/top.c b/procps/top.c index 85699b027..494509c7c 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -535,7 +535,7 @@ int top_main(int argc, char **argv) | |||
535 | 535 | ||
536 | /* do normal option parsing */ | 536 | /* do normal option parsing */ |
537 | opt_complementary = "-"; | 537 | opt_complementary = "-"; |
538 | getopt32(argc, argv, "d:n:b", &sinterval, &siterations); | 538 | getopt32(argv, "d:n:b", &sinterval, &siterations); |
539 | if (option_mask32 & 0x1) interval = xatou(sinterval); // -d | 539 | if (option_mask32 & 0x1) interval = xatou(sinterval); // -d |
540 | if (option_mask32 & 0x2) iterations = xatou(siterations); // -n | 540 | if (option_mask32 & 0x2) iterations = xatou(siterations); // -n |
541 | //if (option_mask32 & 0x4) // -b | 541 | //if (option_mask32 & 0x4) // -b |
diff --git a/procps/watch.c b/procps/watch.c index b2adcd5ce..3d18105bf 100644 --- a/procps/watch.c +++ b/procps/watch.c | |||
@@ -35,7 +35,7 @@ int watch_main(int argc, char **argv) | |||
35 | char **p; | 35 | char **p; |
36 | 36 | ||
37 | opt_complementary = "-1"; // at least one param please | 37 | opt_complementary = "-1"; // at least one param please |
38 | opt = getopt32(argc, argv, "+dtn:", &tmp); | 38 | opt = getopt32(argv, "+dtn:", &tmp); |
39 | //if (opt & 0x1) // -d (ignore) | 39 | //if (opt & 0x1) // -d (ignore) |
40 | //if (opt & 0x2) // -t | 40 | //if (opt & 0x2) // -t |
41 | if (opt & 0x4) period = xatou(tmp); | 41 | if (opt & 0x4) period = xatou(tmp); |