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
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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> */
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user