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 /miscutils | |
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 'miscutils')
-rw-r--r-- | miscutils/adjtimex.c | 2 | ||||
-rw-r--r-- | miscutils/chrt.c | 2 | ||||
-rw-r--r-- | miscutils/eject.c | 2 | ||||
-rw-r--r-- | miscutils/less.c | 2 | ||||
-rw-r--r-- | miscutils/makedevs.c | 2 | ||||
-rw-r--r-- | miscutils/mountpoint.c | 2 | ||||
-rw-r--r-- | miscutils/strings.c | 2 | ||||
-rw-r--r-- | miscutils/taskset.c | 2 | ||||
-rw-r--r-- | miscutils/watchdog.c | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c index 1e6d15fa7..b11807d75 100644 --- a/miscutils/adjtimex.c +++ b/miscutils/adjtimex.c | |||
@@ -56,7 +56,7 @@ int adjtimex_main(int argc, char **argv) | |||
56 | const char *descript; | 56 | const char *descript; |
57 | txc.modes=0; | 57 | txc.modes=0; |
58 | 58 | ||
59 | opt = getopt32(argc, argv, "qo:f:p:t:", | 59 | opt = getopt32(argv, "qo:f:p:t:", |
60 | &opt_o, &opt_f, &opt_p, &opt_t); | 60 | &opt_o, &opt_f, &opt_p, &opt_t); |
61 | //if (opt & 0x1) // -q | 61 | //if (opt & 0x1) // -q |
62 | if (opt & 0x2) { // -o | 62 | if (opt & 0x2) { // -o |
diff --git a/miscutils/chrt.c b/miscutils/chrt.c index d549708b4..98399cedb 100644 --- a/miscutils/chrt.c +++ b/miscutils/chrt.c | |||
@@ -52,7 +52,7 @@ int chrt_main(int argc, char** argv) | |||
52 | int prio = 0, policy = SCHED_RR; | 52 | int prio = 0, policy = SCHED_RR; |
53 | 53 | ||
54 | opt_complementary = "r--fo:f--ro:r--fo"; /* only one policy accepted */ | 54 | opt_complementary = "r--fo:f--ro:r--fo"; /* only one policy accepted */ |
55 | opt = getopt32(argc, argv, "+mp:rfo", &p_opt); | 55 | opt = getopt32(argv, "+mp:rfo", &p_opt); |
56 | if (opt & OPT_r) | 56 | if (opt & OPT_r) |
57 | policy = SCHED_RR; | 57 | policy = SCHED_RR; |
58 | if (opt & OPT_f) | 58 | if (opt & OPT_f) |
diff --git a/miscutils/eject.c b/miscutils/eject.c index 8d062d1bb..e66d74e70 100644 --- a/miscutils/eject.c +++ b/miscutils/eject.c | |||
@@ -33,7 +33,7 @@ int eject_main(int argc, char **argv) | |||
33 | int dev, cmd; | 33 | int dev, cmd; |
34 | 34 | ||
35 | opt_complementary = "?1:t--T:T--t"; | 35 | opt_complementary = "?1:t--T:T--t"; |
36 | flags = getopt32(argc, argv, "tT"); | 36 | flags = getopt32(argv, "tT"); |
37 | device = argv[optind] ? : "/dev/cdrom"; | 37 | device = argv[optind] ? : "/dev/cdrom"; |
38 | 38 | ||
39 | // We used to do "umount <device>" here, but it was buggy | 39 | // We used to do "umount <device>" here, but it was buggy |
diff --git a/miscutils/less.c b/miscutils/less.c index 046a3c459..a2221cfca 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -1321,7 +1321,7 @@ int less_main(int argc, char **argv) | |||
1321 | /* TODO: -x: do not interpret backspace, -xx: tab also */ | 1321 | /* TODO: -x: do not interpret backspace, -xx: tab also */ |
1322 | /* -xxx: newline also */ | 1322 | /* -xxx: newline also */ |
1323 | /* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */ | 1323 | /* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */ |
1324 | getopt32(argc, argv, "EMmN~"); | 1324 | getopt32(argv, "EMmN~"); |
1325 | argc -= optind; | 1325 | argc -= optind; |
1326 | argv += optind; | 1326 | argv += optind; |
1327 | num_files = argc; | 1327 | num_files = argc; |
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c index 6a3e80883..d36c6956a 100644 --- a/miscutils/makedevs.c +++ b/miscutils/makedevs.c | |||
@@ -78,7 +78,7 @@ int makedevs_main(int argc, char **argv) | |||
78 | int linenum = 0; | 78 | int linenum = 0; |
79 | int ret = EXIT_SUCCESS; | 79 | int ret = EXIT_SUCCESS; |
80 | 80 | ||
81 | getopt32(argc, argv, "d:", &line); | 81 | getopt32(argv, "d:", &line); |
82 | if (line) | 82 | if (line) |
83 | table = xfopen(line, "r"); | 83 | table = xfopen(line, "r"); |
84 | 84 | ||
diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c index b5ce35cf1..1f17adadc 100644 --- a/miscutils/mountpoint.c +++ b/miscutils/mountpoint.c | |||
@@ -16,7 +16,7 @@ int mountpoint_main(int argc, char **argv) | |||
16 | { | 16 | { |
17 | struct stat st; | 17 | struct stat st; |
18 | char *arg; | 18 | char *arg; |
19 | int opt = getopt32(argc, argv, "qdx"); | 19 | int opt = getopt32(argv, "qdx"); |
20 | #define OPT_q (1) | 20 | #define OPT_q (1) |
21 | #define OPT_d (2) | 21 | #define OPT_d (2) |
22 | #define OPT_x (4) | 22 | #define OPT_x (4) |
diff --git a/miscutils/strings.c b/miscutils/strings.c index f0ef2a2e9..835880214 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
@@ -28,7 +28,7 @@ int strings_main(int argc, char **argv) | |||
28 | const char *fmt = "%s: "; | 28 | const char *fmt = "%s: "; |
29 | const char *n_arg = "4"; | 29 | const char *n_arg = "4"; |
30 | 30 | ||
31 | opt = getopt32(argc, argv, "afon:", &n_arg); | 31 | opt = getopt32(argv, "afon:", &n_arg); |
32 | /* -a is our default behaviour */ | 32 | /* -a is our default behaviour */ |
33 | /*argc -= optind;*/ | 33 | /*argc -= optind;*/ |
34 | argv += optind; | 34 | argv += optind; |
diff --git a/miscutils/taskset.c b/miscutils/taskset.c index cd8ffc840..0c4bad7ed 100644 --- a/miscutils/taskset.c +++ b/miscutils/taskset.c | |||
@@ -50,7 +50,7 @@ int taskset_main(int argc, char** argv) | |||
50 | const char *state = "current\0new"; | 50 | const char *state = "current\0new"; |
51 | char *p_opt = NULL, *aff = NULL; | 51 | char *p_opt = NULL, *aff = NULL; |
52 | 52 | ||
53 | opt = getopt32(argc, argv, "+p:", &p_opt); | 53 | opt = getopt32(argv, "+p:", &p_opt); |
54 | 54 | ||
55 | if (opt & OPT_p) { | 55 | if (opt & OPT_p) { |
56 | if (argc == optind+1) { /* -p <aff> <pid> */ | 56 | if (argc == optind+1) { /* -p <aff> <pid> */ |
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c index b64291b32..aa367d5ab 100644 --- a/miscutils/watchdog.c +++ b/miscutils/watchdog.c | |||
@@ -30,7 +30,7 @@ int watchdog_main(int argc, char **argv) | |||
30 | char *t_arg; | 30 | char *t_arg; |
31 | 31 | ||
32 | opt_complementary = "=1"; /* must have 1 argument */ | 32 | opt_complementary = "=1"; /* must have 1 argument */ |
33 | opts = getopt32(argc, argv, "Ft:", &t_arg); | 33 | opts = getopt32(argv, "Ft:", &t_arg); |
34 | 34 | ||
35 | if (opts & OPT_TIMER) | 35 | if (opts & OPT_TIMER) |
36 | timer_duration = xatou(t_arg); | 36 | timer_duration = xatou(t_arg); |