summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko2007-08-18 15:32:12 +0000
committerDenis Vlasenko2007-08-18 15:32:12 +0000
commitfe7cd642b0b732f5d41403c2f6983ad676b69dd9 (patch)
treee5962885cb72c976f44b178a350a92ba5f1aa02d /miscutils
parentd6cd9d7fe9eab19a9e36fdda729c78c40205b1e5 (diff)
downloadbusybox-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.zip
busybox-fe7cd642b0b732f5d41403c2f6983ad676b69dd9.tar.gz
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.c2
-rw-r--r--miscutils/chrt.c2
-rw-r--r--miscutils/eject.c2
-rw-r--r--miscutils/less.c2
-rw-r--r--miscutils/makedevs.c2
-rw-r--r--miscutils/mountpoint.c2
-rw-r--r--miscutils/strings.c2
-rw-r--r--miscutils/taskset.c2
-rw-r--r--miscutils/watchdog.c2
9 files changed, 9 insertions, 9 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c
index 1e6d15f..b11807d 100644
--- a/miscutils/adjtimex.c
+++ b/miscutils/adjtimex.c
@@ -56,7 +56,7 @@ int adjtimex_main(int argc, char **argv)
const char *descript;
txc.modes=0;
- opt = getopt32(argc, argv, "qo:f:p:t:",
+ opt = getopt32(argv, "qo:f:p:t:",
&opt_o, &opt_f, &opt_p, &opt_t);
//if (opt & 0x1) // -q
if (opt & 0x2) { // -o
diff --git a/miscutils/chrt.c b/miscutils/chrt.c
index d549708..98399ce 100644
--- a/miscutils/chrt.c
+++ b/miscutils/chrt.c
@@ -52,7 +52,7 @@ int chrt_main(int argc, char** argv)
int prio = 0, policy = SCHED_RR;
opt_complementary = "r--fo:f--ro:r--fo"; /* only one policy accepted */
- opt = getopt32(argc, argv, "+mp:rfo", &p_opt);
+ opt = getopt32(argv, "+mp:rfo", &p_opt);
if (opt & OPT_r)
policy = SCHED_RR;
if (opt & OPT_f)
diff --git a/miscutils/eject.c b/miscutils/eject.c
index 8d062d1..e66d74e 100644
--- a/miscutils/eject.c
+++ b/miscutils/eject.c
@@ -33,7 +33,7 @@ int eject_main(int argc, char **argv)
int dev, cmd;
opt_complementary = "?1:t--T:T--t";
- flags = getopt32(argc, argv, "tT");
+ flags = getopt32(argv, "tT");
device = argv[optind] ? : "/dev/cdrom";
// We used to do "umount <device>" here, but it was buggy
diff --git a/miscutils/less.c b/miscutils/less.c
index 046a3c4..a2221cf 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -1321,7 +1321,7 @@ int less_main(int argc, char **argv)
/* TODO: -x: do not interpret backspace, -xx: tab also */
/* -xxx: newline also */
/* -w N: assume width N (-xxx -w 32: hex viewer of sorts) */
- getopt32(argc, argv, "EMmN~");
+ getopt32(argv, "EMmN~");
argc -= optind;
argv += optind;
num_files = argc;
diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
index 6a3e808..d36c695 100644
--- a/miscutils/makedevs.c
+++ b/miscutils/makedevs.c
@@ -78,7 +78,7 @@ int makedevs_main(int argc, char **argv)
int linenum = 0;
int ret = EXIT_SUCCESS;
- getopt32(argc, argv, "d:", &line);
+ getopt32(argv, "d:", &line);
if (line)
table = xfopen(line, "r");
diff --git a/miscutils/mountpoint.c b/miscutils/mountpoint.c
index b5ce35c..1f17ada 100644
--- a/miscutils/mountpoint.c
+++ b/miscutils/mountpoint.c
@@ -16,7 +16,7 @@ int mountpoint_main(int argc, char **argv)
{
struct stat st;
char *arg;
- int opt = getopt32(argc, argv, "qdx");
+ int opt = getopt32(argv, "qdx");
#define OPT_q (1)
#define OPT_d (2)
#define OPT_x (4)
diff --git a/miscutils/strings.c b/miscutils/strings.c
index f0ef2a2..8358802 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -28,7 +28,7 @@ int strings_main(int argc, char **argv)
const char *fmt = "%s: ";
const char *n_arg = "4";
- opt = getopt32(argc, argv, "afon:", &n_arg);
+ opt = getopt32(argv, "afon:", &n_arg);
/* -a is our default behaviour */
/*argc -= optind;*/
argv += optind;
diff --git a/miscutils/taskset.c b/miscutils/taskset.c
index cd8ffc8..0c4bad7 100644
--- a/miscutils/taskset.c
+++ b/miscutils/taskset.c
@@ -50,7 +50,7 @@ int taskset_main(int argc, char** argv)
const char *state = "current\0new";
char *p_opt = NULL, *aff = NULL;
- opt = getopt32(argc, argv, "+p:", &p_opt);
+ opt = getopt32(argv, "+p:", &p_opt);
if (opt & OPT_p) {
if (argc == optind+1) { /* -p <aff> <pid> */
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index b64291b..aa367d5 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -30,7 +30,7 @@ int watchdog_main(int argc, char **argv)
char *t_arg;
opt_complementary = "=1"; /* must have 1 argument */
- opts = getopt32(argc, argv, "Ft:", &t_arg);
+ opts = getopt32(argv, "Ft:", &t_arg);
if (opts & OPT_TIMER)
timer_duration = xatou(t_arg);