summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenis Vlasenko2007-08-18 15:32:12 +0000
committerDenis Vlasenko2007-08-18 15:32:12 +0000
commitfe7cd642b0b732f5d41403c2f6983ad676b69dd9 (patch)
treee5962885cb72c976f44b178a350a92ba5f1aa02d /coreutils
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 'coreutils')
-rw-r--r--coreutils/cal.c2
-rw-r--r--coreutils/cat.c2
-rw-r--r--coreutils/catv.c2
-rw-r--r--coreutils/chmod.c2
-rw-r--r--coreutils/chown.c2
-rw-r--r--coreutils/comm.c2
-rw-r--r--coreutils/cp.c2
-rw-r--r--coreutils/cut.c2
-rw-r--r--coreutils/date.c2
-rw-r--r--coreutils/df.c4
-rw-r--r--coreutils/dos2unix.c2
-rw-r--r--coreutils/du.c4
-rw-r--r--coreutils/env.c2
-rw-r--r--coreutils/expand.c4
-rw-r--r--coreutils/fold.c2
-rw-r--r--coreutils/id.c2
-rw-r--r--coreutils/install.c2
-rw-r--r--coreutils/libcoreutils/getopt_mk_fifo_nod.c2
-rw-r--r--coreutils/ln.c2
-rw-r--r--coreutils/ls.c4
-rw-r--r--coreutils/md5_sha1_sum.c2
-rw-r--r--coreutils/mkdir.c2
-rw-r--r--coreutils/mv.c2
-rw-r--r--coreutils/od_bloaty.c2
-rw-r--r--coreutils/readlink.c2
-rw-r--r--coreutils/rm.c2
-rw-r--r--coreutils/rmdir.c2
-rw-r--r--coreutils/sort.c2
-rw-r--r--coreutils/split.c2
-rw-r--r--coreutils/stat.c2
-rw-r--r--coreutils/sum.c2
-rw-r--r--coreutils/tail.c2
-rw-r--r--coreutils/tee.c2
-rw-r--r--coreutils/touch.c2
-rw-r--r--coreutils/tty.c2
-rw-r--r--coreutils/uname.c2
-rw-r--r--coreutils/uniq.c2
-rw-r--r--coreutils/uudecode.c2
-rw-r--r--coreutils/uuencode.c2
-rw-r--r--coreutils/wc.c2
40 files changed, 44 insertions, 44 deletions
diff --git a/coreutils/cal.c b/coreutils/cal.c
index 3170993..35a5631 100644
--- a/coreutils/cal.c
+++ b/coreutils/cal.c
@@ -86,7 +86,7 @@ int cal_main(int argc, char **argv)
char day_headings[28]; /* 28 for julian, 21 for nonjulian */
char buf[40];
- flags = getopt32(argc, argv, "jy");
+ flags = getopt32(argv, "jy");
julian = flags & 1;
month = 0;
argv += optind;
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 64e697e..cd52778 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -46,7 +46,7 @@ int bb_cat(char **argv)
int cat_main(int argc, char **argv);
int cat_main(int argc, char **argv)
{
- getopt32(argc, argv, "u");
+ getopt32(argv, "u");
argv += optind;
return bb_cat(argv);
}
diff --git a/coreutils/catv.c b/coreutils/catv.c
index 0ca73a0..ce92746 100644
--- a/coreutils/catv.c
+++ b/coreutils/catv.c
@@ -19,7 +19,7 @@ int catv_main(int argc, char **argv)
int fd;
unsigned flags;
- flags = getopt32(argc, argv, "etv");
+ flags = getopt32(argv, "etv");
#define CATV_OPT_e (1<<0)
#define CATV_OPT_t (1<<1)
#define CATV_OPT_v (1<<2)
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index 52cc40d..8b21499 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -93,7 +93,7 @@ int chmod_main(int argc, char **argv)
/* Parse options */
opt_complementary = "-2";
- getopt32(argc, argv, ("-"OPT_STR) + 1); /* Reuse string */
+ getopt32(argv, ("-"OPT_STR) + 1); /* Reuse string */
argv += optind;
/* Restore option-like mode if needed */
diff --git a/coreutils/chown.c b/coreutils/chown.c
index eb8d8c4..cfd3734 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -69,7 +69,7 @@ int chown_main(int argc, char **argv)
chown_fptr chown_func;
opt_complementary = "-2";
- getopt32(argc, argv, OPT_STR);
+ getopt32(argv, OPT_STR);
argv += optind;
/* This matches coreutils behavior (almost - see below) */
diff --git a/coreutils/comm.c b/coreutils/comm.c
index 3be6760..a4ab148 100644
--- a/coreutils/comm.c
+++ b/coreutils/comm.c
@@ -47,7 +47,7 @@ int comm_main(int argc, char **argv)
unsigned flags;
opt_complementary = "=2";
- flags = getopt32(argc, argv, "123");
+ flags = getopt32(argv, "123");
argv += optind;
for (i = 0; i < 2; ++i) {
diff --git a/coreutils/cp.c b/coreutils/cp.c
index 78bd73c..884fbf7 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -45,7 +45,7 @@ int cp_main(int argc, char **argv)
// -r and -R are the same
// -a = -pdR
opt_complementary = "l--s:s--l:Pd:rR:apdR";
- flags = getopt32(argc, argv, FILEUTILS_CP_OPTSTR "arPHL");
+ flags = getopt32(argv, FILEUTILS_CP_OPTSTR "arPHL");
/* Default behavior of cp is to dereference, so we don't have to do
* anything special when we are given -L.
* The behavior of -H is *almost* like -L, but not quite, so let's
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 2598a9a..1cf49c2 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -171,7 +171,7 @@ int cut_main(int argc, char **argv)
char *sopt, *ltok;
opt_complementary = "b--bcf:c--bcf:f--bcf";
- getopt32(argc, argv, optstring, &sopt, &sopt, &sopt, &ltok);
+ getopt32(argv, optstring, &sopt, &sopt, &sopt, &ltok);
// argc -= optind;
argv += optind;
if (!(option_mask32 & (CUT_OPT_BYTE_FLGS | CUT_OPT_CHAR_FLGS | CUT_OPT_FIELDS_FLGS)))
diff --git a/coreutils/date.c b/coreutils/date.c
index 5ee70f7..e33a977 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -53,7 +53,7 @@ int date_main(int argc, char **argv)
opt_complementary = "d--s:s--d"
USE_FEATURE_DATE_ISOFMT(":R--I:I--R");
- opt = getopt32(argc, argv, "Rs:ud:r:"
+ opt = getopt32(argv, "Rs:ud:r:"
USE_FEATURE_DATE_ISOFMT("I::D:"),
&date_str, &date_str, &filename
USE_FEATURE_DATE_ISOFMT(, &isofmt_arg, &hintfmt_arg));
diff --git a/coreutils/df.c b/coreutils/df.c
index fba59e7..7eb82cd 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -47,7 +47,7 @@ int df_main(int argc, char **argv)
#if ENABLE_FEATURE_HUMAN_READABLE
opt_complementary = "h-km:k-hm:m-hk";
- opt = getopt32(argc, argv, "hmk");
+ opt = getopt32(argv, "hmk");
if (opt & 1) {
df_disp_hr = 0;
disp_units_hdr = " Size";
@@ -57,7 +57,7 @@ int df_main(int argc, char **argv)
disp_units_hdr = "1M-blocks";
}
#else
- opt = getopt32(argc, argv, "k");
+ opt = getopt32(argv, "k");
#endif
printf("Filesystem%11s%-15sUsed Available Use%% Mounted on\n",
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 1bfdf0c..2811098 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -92,7 +92,7 @@ int dos2unix_main(int argc, char **argv)
/* -u convert to unix, -d convert to dos */
opt_complementary = "u--d:d--u"; /* mutually exclusive */
- o = getopt32(argc, argv, "du");
+ o = getopt32(argv, "du");
/* Do the conversion requested by an argument else do the default
* conversion depending on our name. */
diff --git a/coreutils/du.c b/coreutils/du.c
index 1974871..757fa14 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -170,7 +170,7 @@ int du_main(int argc, char **argv)
*/
#if ENABLE_FEATURE_HUMAN_READABLE
opt_complementary = "h-km:k-hm:m-hk:H-L:L-H:s-d:d-s";
- opt = getopt32(argc, argv, "aHkLsx" "d:" "lc" "hm", &smax_print_depth);
+ opt = getopt32(argv, "aHkLsx" "d:" "lc" "hm", &smax_print_depth);
if (opt & (1 << 9)) {
/* -h opt */
disp_hr = 0;
@@ -185,7 +185,7 @@ int du_main(int argc, char **argv)
}
#else
opt_complementary = "H-L:L-H:s-d:d-s";
- opt = getopt32(argc, argv, "aHkLsx" "d:" "lc", &smax_print_depth);
+ opt = getopt32(argv, "aHkLsx" "d:" "lc", &smax_print_depth);
#if !ENABLE_FEATURE_DU_DEFAULT_BLOCKSIZE_1K
if (opt & (1 << 2)) {
/* -k opt */
diff --git a/coreutils/env.c b/coreutils/env.c
index dc86671..8d2d881 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -54,7 +54,7 @@ int env_main(int argc, char** argv)
#if ENABLE_FEATURE_ENV_LONG_OPTIONS
applet_long_options = env_longopts;
#endif
- opt = getopt32(argc, argv, "+iu:", &unset_env);
+ opt = getopt32(argv, "+iu:", &unset_env);
argv += optind;
if (*argv && LONE_DASH(argv[0])) {
opt |= 1;
diff --git a/coreutils/expand.c b/coreutils/expand.c
index 4b5fa10..274753f 100644
--- a/coreutils/expand.c
+++ b/coreutils/expand.c
@@ -153,12 +153,12 @@ int expand_main(int argc, char **argv)
if (ENABLE_EXPAND && (!ENABLE_UNEXPAND || applet_name[0] == 'e')) {
USE_FEATURE_EXPAND_LONG_OPTIONS(applet_long_options = expand_longopts);
- opt = getopt32(argc, argv, "it:", &opt_t);
+ opt = getopt32(argv, "it:", &opt_t);
} else if (ENABLE_UNEXPAND) {
USE_FEATURE_UNEXPAND_LONG_OPTIONS(applet_long_options = unexpand_longopts);
/* -t NUM sets also -a */
opt_complementary = "ta";
- opt = getopt32(argc, argv, "ft:a", &opt_t);
+ opt = getopt32(argv, "ft:a", &opt_t);
/* -f --first-only is the default */
if (!(opt & OPT_ALL)) opt |= OPT_INITIAL;
}
diff --git a/coreutils/fold.c b/coreutils/fold.c
index 11b8809..0184961 100644
--- a/coreutils/fold.c
+++ b/coreutils/fold.c
@@ -63,7 +63,7 @@ int fold_main(int argc, char **argv)
}
}
- flags = getopt32(argc, argv, "bsw:", &w_opt);
+ flags = getopt32(argv, "bsw:", &w_opt);
if (flags & FLAG_WIDTH)
width = xatoul_range(w_opt, 1, 10000);
diff --git a/coreutils/id.c b/coreutils/id.c
index 614d6d0..1cc8c4d 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -50,7 +50,7 @@ int id_main(int argc, char **argv)
/* Don't allow -n -r -nr -ug -rug -nug -rnug */
/* Don't allow more than one username */
opt_complementary = "?1:u--g:g--u:r?ug:n?ug" USE_SELINUX(":u--Z:Z--u:g--Z:Z--g");
- flags = getopt32(argc, argv, "rnug" USE_SELINUX("Z"));
+ flags = getopt32(argv, "rnug" USE_SELINUX("Z"));
/* This values could be overwritten later */
uid = geteuid();
diff --git a/coreutils/install.c b/coreutils/install.c
index 79cd020..cf62a00 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -101,7 +101,7 @@ int install_main(int argc, char **argv)
opt_complementary = "s--d:d--s" USE_SELINUX(":Z--\xff:\xff--Z");
/* -c exists for backwards compatibility, it's needed */
- flags = getopt32(argc, argv, "cdpsg:m:o:" USE_SELINUX("Z:"),
+ flags = getopt32(argv, "cdpsg:m:o:" USE_SELINUX("Z:"),
&gid_str, &mode_str, &uid_str USE_SELINUX(, &scontext));
#if ENABLE_SELINUX
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
index 6fd2de7..3776215 100644
--- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c
+++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c
@@ -31,7 +31,7 @@ mode_t getopt_mk_fifo_nod(int argc, char **argv)
security_context_t scontext;
#endif
int opt;
- opt = getopt32(argc, argv, "m:" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext));
+ opt = getopt32(argv, "m:" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext));
if (opt & 1) {
if (bb_parse_mode(smode, &mode))
umask(0);
diff --git a/coreutils/ln.c b/coreutils/ln.c
index cffd4fd..a649903 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -34,7 +34,7 @@ int ln_main(int argc, char **argv)
struct stat statbuf;
int (*link_func)(const char *, const char *);
- flag = getopt32(argc, argv, "sfnbS:", &suffix);
+ flag = getopt32(argv, "sfnbS:", &suffix);
if (argc == optind) {
bb_show_usage();
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 2b29255..4adf523 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -820,14 +820,14 @@ int ls_main(int argc, char **argv)
/* process options */
USE_FEATURE_LS_COLOR(applet_long_options = ls_color_opt;)
#if ENABLE_FEATURE_AUTOWIDTH
- opt = getopt32(argc, argv, ls_options, &tabstops_str, &terminal_width_str
+ opt = getopt32(argv, ls_options, &tabstops_str, &terminal_width_str
USE_FEATURE_LS_COLOR(, &color_opt));
if (tabstops_str)
tabstops = xatou(tabstops_str);
if (terminal_width_str)
terminal_width = xatou(terminal_width_str);
#else
- opt = getopt32(argc, argv, ls_options USE_FEATURE_LS_COLOR(, &color_opt));
+ opt = getopt32(argv, ls_options USE_FEATURE_LS_COLOR(, &color_opt));
#endif
for (i = 0; opt_flags[i] != (1U<<31); i++) {
if (opt & (1 << i)) {
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index 8bc2034..7f8b084 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -88,7 +88,7 @@ int md5_sha1_sum_main(int argc, char **argv)
: HASH_SHA1;
if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK)
- flags = getopt32(argc, argv, "scw");
+ flags = getopt32(argv, "scw");
else optind = 1;
if (ENABLE_FEATURE_MD5_SHA1_SUM_CHECK && !(flags & FLAG_CHECK)) {
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 22a070c..d1a4380 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -49,7 +49,7 @@ int mkdir_main(int argc, char **argv)
#if ENABLE_FEATURE_MKDIR_LONG_OPTIONS
applet_long_options = mkdir_longopts;
#endif
- opt = getopt32(argc, argv, "m:p" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext));
+ opt = getopt32(argv, "m:p" USE_SELINUX("Z:"), &smode USE_SELINUX(,&scontext));
if (opt & 1) {
mode = 0777;
if (!bb_parse_mode(smode, &mode)) {
diff --git a/coreutils/mv.c b/coreutils/mv.c
index 4cd0fcf..553bb6e 100644
--- a/coreutils/mv.c
+++ b/coreutils/mv.c
@@ -48,7 +48,7 @@ int mv_main(int argc, char **argv)
applet_long_options = mv_longopts;
#endif
opt_complementary = "f-i:i-f";
- flags = getopt32(argc, argv, "fi");
+ flags = getopt32(argv, "fi");
if (optind + 2 > argc) {
bb_show_usage();
}
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index d3c9f9a..8174ab6 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -1259,7 +1259,7 @@ int od_main(int argc, char **argv)
#if ENABLE_GETOPT_LONG
applet_long_options = od_longopts;
#endif
- opt = getopt32(argc, argv, "A:N:abcdfhij:lot:vxsS:"
+ opt = getopt32(argv, "A:N:abcdfhij:lot:vxsS:"
"w::", // -w with optional param
// -S was -s and also had optional parameter
// but in coreutils 6.3 it was renamed and now has
diff --git a/coreutils/readlink.c b/coreutils/readlink.c
index d454cbf..39edc05 100644
--- a/coreutils/readlink.c
+++ b/coreutils/readlink.c
@@ -21,7 +21,7 @@ int readlink_main(int argc, char **argv)
unsigned opt;
/* We need exactly one non-option argument. */
opt_complementary = "=1";
- opt = getopt32(argc, argv, "f");
+ opt = getopt32(argv, "f");
fname = argv[optind];
)
SKIP_FEATURE_READLINK_FOLLOW(
diff --git a/coreutils/rm.c b/coreutils/rm.c
index cc22647..ba37762 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -27,7 +27,7 @@ int rm_main(int argc, char **argv)
unsigned opt;
opt_complementary = "f-i:i-f";
- opt = getopt32(argc, argv, "fiRr");
+ opt = getopt32(argv, "fiRr");
argv += optind;
if (opt & 1)
flags |= FILEUTILS_FORCE;
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index c1b89e4..315401e 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -24,7 +24,7 @@ int rmdir_main(int argc, char **argv)
int do_dot;
char *path;
- flags = getopt32(argc, argv, "p");
+ flags = getopt32(argv, "p");
argv += optind;
if (!*argv) {
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 98c1bc3..311c774 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -290,7 +290,7 @@ int sort_main(int argc, char **argv)
/* -o and -t can be given at most once */
opt_complementary = "o--o:t--t:" /* -t, -o: maximum one of each */
"k::"; /* -k takes list */
- getopt32(argc, argv, OPT_STR, &str_ignored, &str_ignored, &str_o, &lst_k, &str_t);
+ getopt32(argv, OPT_STR, &str_ignored, &str_ignored, &str_o, &lst_k, &str_t);
#if ENABLE_FEATURE_SORT_BIG
if (option_mask32 & FLAG_o) outfile = xfopen(str_o, "w");
if (option_mask32 & FLAG_t) {
diff --git a/coreutils/split.c b/coreutils/split.c
index d1eb829..3ec539a 100644
--- a/coreutils/split.c
+++ b/coreutils/split.c
@@ -69,7 +69,7 @@ int split_main(int argc, char **argv)
char *src;
opt_complementary = "?2";
- opt = getopt32(argc, argv, "l:b:a:", &count_p, &count_p, &sfx);
+ opt = getopt32(argv, "l:b:a:", &count_p, &count_p, &sfx);
if (opt & SPLIT_OPT_l)
cnt = xatoul(count_p);
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 0fddea2..18e8e07 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -614,7 +614,7 @@ int stat_main(int argc, char **argv)
int ok = 1;
bool (*statfunc)(char const *, char const *) = do_stat;
- getopt32(argc, argv, "ftL"
+ getopt32(argv, "ftL"
USE_SELINUX("Z")
USE_FEATURE_STAT_FORMAT("c:", &format)
);
diff --git a/coreutils/sum.c b/coreutils/sum.c
index 5799d14..4a3760b 100644
--- a/coreutils/sum.c
+++ b/coreutils/sum.c
@@ -80,7 +80,7 @@ int sum_main(int argc, char **argv)
unsigned n;
unsigned type = SUM_BSD;
- n = getopt32(argc, argv, "sr");
+ n = getopt32(argv, "sr");
if (n & 1) type = SUM_SYSV;
/* give the bsd priority over sysv func */
if (n & 2) type = SUM_BSD;
diff --git a/coreutils/tail.c b/coreutils/tail.c
index ec21c42..74e1423 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -107,7 +107,7 @@ int tail_main(int argc, char **argv)
}
#endif
- opt = getopt32(argc, argv, "fc:n:" USE_FEATURE_FANCY_TAIL("qs:v"),
+ opt = getopt32(argv, "fc:n:" USE_FEATURE_FANCY_TAIL("qs:v"),
&str_c, &str_n USE_FEATURE_FANCY_TAIL(,&str_s));
#define FOLLOW (opt & 0x1)
#define COUNT_BYTES (opt & 0x2)
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 2160141..d253028 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -28,7 +28,7 @@ int tee_main(int argc, char **argv)
#else
int c;
#endif
- retval = getopt32(argc, argv, "ia"); /* 'a' must be 2nd */
+ retval = getopt32(argv, "ia"); /* 'a' must be 2nd */
argc -= optind;
argv += optind;
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 7b82339..7a1dd35 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -26,7 +26,7 @@ int touch_main(int argc, char **argv)
{
int fd;
int status = EXIT_SUCCESS;
- int flags = getopt32(argc, argv, "c");
+ int flags = getopt32(argv, "c");
argv += optind;
diff --git a/coreutils/tty.c b/coreutils/tty.c
index 2c77c99..d8ce78c 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -21,7 +21,7 @@ int tty_main(int argc, char **argv)
xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */
- USE_INCLUDE_SUSv2(silent = getopt32(argc, argv, "s");)
+ USE_INCLUDE_SUSv2(silent = getopt32(argv, "s");)
/* gnu tty outputs a warning that it is ignoring all args. */
bb_warn_ignoring_args(argc - optind);
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 8f07f19..e4724c8 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -58,7 +58,7 @@ int uname_main(int argc, char **argv)
const unsigned short int *delta;
char toprint;
- toprint = getopt32(argc, argv, options);
+ toprint = getopt32(argv, options);
if (argc != optind) {
bb_show_usage();
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index a7caef9..719bbb5 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -45,7 +45,7 @@ int uniq_main(int argc, char **argv)
skip_fields = skip_chars = 0;
- opt = getopt32(argc, argv, "cduf:s:", &s0, &s1);
+ opt = getopt32(argv, "cduf:s:", &s0, &s1);
if (opt & OPT_f)
skip_fields = xatoul(s0);
if (opt & OPT_s)
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 2dd8f94..4c918ff 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -134,7 +134,7 @@ int uudecode_main(int argc, char **argv)
char *line;
opt_complementary = "?1"; /* 1 argument max */
- getopt32(argc, argv, "o:", &outname);
+ getopt32(argv, "o:", &outname);
argv += optind;
if (argv[0])
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index c1458f7..56d6882 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -28,7 +28,7 @@ int uuencode_main(int argc, char **argv)
tbl = bb_uuenc_tbl_std;
mode = 0666 & ~umask(0666);
opt_complementary = "-1:?2"; /* must have 1 or 2 args */
- if (getopt32(argc, argv, "m")) {
+ if (getopt32(argv, "m")) {
tbl = bb_uuenc_tbl_base64;
}
argv += optind;
diff --git a/coreutils/wc.c b/coreutils/wc.c
index 627267d..e86b7d4 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -86,7 +86,7 @@ int wc_main(int argc, char **argv)
smallint in_word;
unsigned print_type;
- print_type = getopt32(argc, argv, "lwcL");
+ print_type = getopt32(argv, "lwcL");
if (print_type == 0) {
print_type = (1 << WC_LINES) | (1 << WC_WORDS) | (1 << WC_CHARS);