aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-08-18 15:32:12 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-08-18 15:32:12 +0000
commitfe7cd642b0b732f5d41403c2f6983ad676b69dd9 (patch)
treee5962885cb72c976f44b178a350a92ba5f1aa02d /networking
parentd6cd9d7fe9eab19a9e36fdda729c78c40205b1e5 (diff)
downloadbusybox-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 'networking')
-rw-r--r--networking/arp.c2
-rw-r--r--networking/arping.c2
-rw-r--r--networking/dnsd.c2
-rw-r--r--networking/ether-wake.c2
-rw-r--r--networking/ftpgetput.c2
-rw-r--r--networking/hostname.c2
-rw-r--r--networking/httpd.c2
-rw-r--r--networking/ifupdown.c2
-rw-r--r--networking/inetd.c2
-rw-r--r--networking/ipcalc.c2
-rw-r--r--networking/isrv_identd.c2
-rw-r--r--networking/nameif.c2
-rw-r--r--networking/nc_bloaty.c2
-rw-r--r--networking/netstat.c2
-rw-r--r--networking/ping.c2
-rw-r--r--networking/pscan.c2
-rw-r--r--networking/route.c2
-rw-r--r--networking/slattach.c2
-rw-r--r--networking/telnet.c2
-rw-r--r--networking/telnetd.c2
-rw-r--r--networking/tftp.c2
-rw-r--r--networking/traceroute.c2
-rw-r--r--networking/udhcp/dhcpc.c2
-rw-r--r--networking/udhcp/dhcpd.c2
-rw-r--r--networking/udhcp/dumpleases.c2
-rw-r--r--networking/wget.c2
-rw-r--r--networking/zcip.c2
27 files changed, 27 insertions, 27 deletions
diff --git a/networking/arp.c b/networking/arp.c
index a5a737349..8cdee1832 100644
--- a/networking/arp.c
+++ b/networking/arp.c
@@ -445,7 +445,7 @@ int arp_main(int argc, char **argv)
if (!ap)
bb_error_msg_and_die("%s: %s not supported", DFLT_AF, "address family");
- getopt32(argc, argv, "A:p:H:t:i:adnDsv", &protocol, &protocol,
+ getopt32(argv, "A:p:H:t:i:adnDsv", &protocol, &protocol,
&hw_type, &hw_type, &device);
argv += optind;
if (option_mask32 & ARP_OPT_A || option_mask32 & ARP_OPT_p) {
diff --git a/networking/arping.c b/networking/arping.c
index 8e457b13a..a2c4c2247 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -249,7 +249,7 @@ int arping_main(int argc, char **argv)
* Advert also sets unsolicited.
*/
opt_complementary = "=1:Df:AU";
- opt = getopt32(argc, argv, "DUAqfbc:w:I:s:",
+ opt = getopt32(argv, "DUAqfbc:w:I:s:",
&str_count, &str_timeout, &device, &source);
if (opt & 0x40) /* -c: count */
count = xatou(str_count);
diff --git a/networking/dnsd.c b/networking/dnsd.c
index 672b729e0..c906de32a 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -338,7 +338,7 @@ int dnsd_main(int argc, char **argv)
uint16_t port = 53;
uint8_t buf[MAX_PACK_LEN];
- getopt32(argc, argv, "i:c:t:p:dv", &listen_interface, &fileconf, &sttl, &sport);
+ getopt32(argv, "i:c:t:p:dv", &listen_interface, &fileconf, &sttl, &sport);
//if (option_mask32 & 0x1) // -i
//if (option_mask32 & 0x2) // -c
if (option_mask32 & 0x4) // -t
diff --git a/networking/ether-wake.c b/networking/ether-wake.c
index b67e1b5d8..36713837a 100644
--- a/networking/ether-wake.c
+++ b/networking/ether-wake.c
@@ -195,7 +195,7 @@ int ether_wake_main(int argc, char **argv)
/* handle misc user options */
opt_complementary = "=1";
- flags = getopt32(argc, argv, "bi:p:", &ifname, &pass);
+ flags = getopt32(argv, "bi:p:", &ifname, &pass);
if (flags & 4) /* -p */
wol_passwd_sz = get_wol_pw(pass, wol_passwd);
flags &= 1; /* we further interested only in -b [bcast] flag */
diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c
index 255e413cb..d7e2bfa5d 100644
--- a/networking/ftpgetput.c
+++ b/networking/ftpgetput.c
@@ -331,7 +331,7 @@ int ftpgetput_main(int argc, char **argv)
applet_long_options = ftpgetput_longopts;
#endif
opt_complementary = "=3"; /* must have 3 params */
- opt = getopt32(argc, argv, "cvu:p:P:", &server->user, &server->password, &port);
+ opt = getopt32(argv, "cvu:p:P:", &server->user, &server->password, &port);
argv += optind;
/* Process the non-option command line arguments */
diff --git a/networking/hostname.c b/networking/hostname.c
index 862bbdfa2..95dc4515d 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -60,7 +60,7 @@ int hostname_main(int argc, char **argv)
if (argc < 1)
bb_show_usage();
- getopt32(argc, argv, "dfisF:", &hostname_str);
+ getopt32(argv, "dfisF:", &hostname_str);
/* Output in desired format */
if (option_mask32 & OPT_dfis) {
diff --git a/networking/httpd.c b/networking/httpd.c
index 072714435..c837d67ad 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -1975,7 +1975,7 @@ int httpd_main(int argc, char **argv)
/* We do not "absolutize" path given by -h (home) opt.
* If user gives relative path in -h, $SCRIPT_FILENAME can end up
* relative too. */
- opt = getopt32(argc, argv, "c:d:h:"
+ opt = getopt32(argv, "c:d:h:"
USE_FEATURE_HTTPD_ENCODE_URL_STR("e:")
USE_FEATURE_HTTPD_BASIC_AUTH("r:")
USE_FEATURE_HTTPD_AUTH_MD5("m:")
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index e1c1e652b..128cc37bd 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -1148,7 +1148,7 @@ int ifupdown_main(int argc, char **argv)
cmds = iface_up;
}
- getopt32(argc, argv, OPTION_STR, &interfaces);
+ getopt32(argv, OPTION_STR, &interfaces);
if (argc - optind > 0) {
if (DO_ALL) bb_show_usage();
} else {
diff --git a/networking/inetd.c b/networking/inetd.c
index a7517ebdf..e4e9f95b0 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1278,7 +1278,7 @@ int inetd_main(int argc, char **argv)
if (uid != 0)
config_filename = NULL;
- opt = getopt32(argc, argv, "R:f", &stoomany);
+ opt = getopt32(argv, "R:f", &stoomany);
if (opt & 1)
toomany = xatoi_u(stoomany);
argv += optind;
diff --git a/networking/ipcalc.c b/networking/ipcalc.c
index 3f99b7511..759704379 100644
--- a/networking/ipcalc.c
+++ b/networking/ipcalc.c
@@ -87,7 +87,7 @@ int ipcalc_main(int argc, char **argv)
#if ENABLE_FEATURE_IPCALC_LONG_OPTIONS
applet_long_options = ipcalc_longopts;
#endif
- opt = getopt32(argc, argv, "mbn" USE_FEATURE_IPCALC_FANCY("phs"));
+ opt = getopt32(argv, "mbn" USE_FEATURE_IPCALC_FANCY("phs"));
argc -= optind;
argv += optind;
if (opt & (BROADCAST | NETWORK | NETPREFIX)) {
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c
index 84cf6da6a..23f6758a0 100644
--- a/networking/isrv_identd.c
+++ b/networking/isrv_identd.c
@@ -107,7 +107,7 @@ int fakeidentd_main(int argc, char **argv)
unsigned opt;
int fd;
- opt = getopt32(argc, argv, "fiwb:", &bind_address);
+ opt = getopt32(argv, "fiwb:", &bind_address);
strcpy(bogouser, "nobody");
if (argv[optind])
strncpy(bogouser, argv[optind], sizeof(bogouser));
diff --git a/networking/nameif.c b/networking/nameif.c
index fd081fd63..daac191bf 100644
--- a/networking/nameif.c
+++ b/networking/nameif.c
@@ -66,7 +66,7 @@ int nameif_main(int argc, char **argv)
int if_index = 1;
mactable_t *ch;
- if (1 & getopt32(argc, argv, "sc:", &fname)) {
+ if (1 & getopt32(argv, "sc:", &fname)) {
openlog(applet_name, 0, LOG_LOCAL0);
logmode = LOGMODE_SYSLOG;
}
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index 30abb3c1c..ab8246531 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -706,7 +706,7 @@ int nc_main(int argc, char **argv)
// -g -G -t -r deleted, unimplemented -a deleted too
opt_complementary = "?2:vv"; /* max 2 params, -v is a counter */
- getopt32(argc, argv, "hnp:s:uvw:" USE_NC_SERVER("l")
+ getopt32(argv, "hnp:s:uvw:" USE_NC_SERVER("l")
USE_NC_EXTRA("i:o:z"),
&str_p, &str_s, &str_w
USE_NC_EXTRA(, &str_i, &str_o, &o_verbose));
diff --git a/networking/netstat.c b/networking/netstat.c
index 9fd3d2f86..5bacb47cc 100644
--- a/networking/netstat.c
+++ b/networking/netstat.c
@@ -497,7 +497,7 @@ int netstat_main(int argc, char **argv)
#endif
/* Option string must match NETSTAT_xxx constants */
- opt = getopt32(argc, argv, NETSTAT_OPTS);
+ opt = getopt32(argv, NETSTAT_OPTS);
if (opt & 0x1) { // -l
flags &= ~NETSTAT_CONNECTED;
flags |= NETSTAT_LISTENING;
diff --git a/networking/ping.c b/networking/ping.c
index d1a413dd3..5d61cd768 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -689,7 +689,7 @@ int ping_main(int argc, char **argv)
/* exactly one argument needed, -v and -q don't mix */
opt_complementary = "=1:q--v:v--q";
- getopt32(argc, argv, OPT_STRING, &opt_c, &opt_s, &opt_I);
+ getopt32(argv, OPT_STRING, &opt_c, &opt_s, &opt_I);
if (option_mask32 & OPT_c) pingcount = xatoul(opt_c); // -c
if (option_mask32 & OPT_s) datalen = xatou16(opt_s); // -s
if (option_mask32 & OPT_I) { // -I
diff --git a/networking/pscan.c b/networking/pscan.c
index 9eda16865..5ae3e61dd 100644
--- a/networking/pscan.c
+++ b/networking/pscan.c
@@ -54,7 +54,7 @@ int pscan_main(int argc, char **argv)
unsigned start;
opt_complementary = "=1"; /* exactly one non-option */
- getopt32(argc, argv, "p:P:t:T:", &opt_min_port, &opt_max_port, &opt_timeout, &opt_min_rtt);
+ getopt32(argv, "p:P:t:T:", &opt_min_port, &opt_max_port, &opt_timeout, &opt_min_rtt);
argv += optind;
max_port = xatou_range(opt_max_port, 1, 65535);
port = xatou_range(opt_min_port, 1, max_port);
diff --git a/networking/route.c b/networking/route.c
index bfa58da2a..55a6c2155 100644
--- a/networking/route.c
+++ b/networking/route.c
@@ -656,7 +656,7 @@ int route_main(int argc, char **argv)
}
}
- opt = getopt32(argc, argv, "A:ne", &family);
+ opt = getopt32(argv, "A:ne", &family);
if ((opt & ROUTE_OPT_A) && strcmp(family, "inet") != 0) {
#if ENABLE_FEATURE_IPV6
diff --git a/networking/slattach.c b/networking/slattach.c
index f78c88e89..ce6d705a8 100644
--- a/networking/slattach.c
+++ b/networking/slattach.c
@@ -152,7 +152,7 @@ int slattach_main(int argc, char **argv)
INIT_G();
/* Parse command line options */
- opt = getopt32(argc, argv, "p:s:c:ehmLF", &proto, &baud_str, &extcmd);
+ opt = getopt32(argv, "p:s:c:ehmLF", &proto, &baud_str, &extcmd);
/*argc -= optind;*/
argv += optind;
diff --git a/networking/telnet.c b/networking/telnet.c
index 4e8b27ba6..ae526fa9e 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -583,7 +583,7 @@ int telnet_main(int argc, char** argv)
bb_show_usage();
#if ENABLE_FEATURE_TELNET_AUTOLOGIN
- if (1 & getopt32(argc, argv, "al:", &G.autologin))
+ if (1 & getopt32(argv, "al:", &G.autologin))
G.autologin = getenv("USER");
argv += optind;
#else
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 9246f7052..b21991212 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -386,7 +386,7 @@ int telnetd_main(int argc, char **argv)
OPT_INETD = 0x20 * ENABLE_FEATURE_TELNETD_STANDALONE,
};
- opt = getopt32(argc, argv, "f:l:" USE_FEATURE_TELNETD_STANDALONE("p:b:Fi"),
+ opt = getopt32(argv, "f:l:" USE_FEATURE_TELNETD_STANDALONE("p:b:Fi"),
&issuefile, &loginpath
USE_FEATURE_TELNETD_STANDALONE(, &opt_portnbr, &opt_bindaddr));
/* Redirect log to syslog early, if needed */
diff --git a/networking/tftp.c b/networking/tftp.c
index 030c0116e..6be265b4c 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -405,7 +405,7 @@ int tftp_main(int argc, char **argv)
opt_complementary = "" USE_FEATURE_TFTP_GET("g:") USE_FEATURE_TFTP_PUT("p:")
USE_GETPUT("?g--p:p--g");
- USE_GETPUT(cmd =) getopt32(argc, argv,
+ USE_GETPUT(cmd =) getopt32(argv,
USE_FEATURE_TFTP_GET("g") USE_FEATURE_TFTP_PUT("p")
"l:r:" USE_FEATURE_TFTP_BLOCKSIZE("b:"),
&localfile, &remotefile
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 0923d97dc..236ddbdaf 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -941,7 +941,7 @@ int traceroute_main(int argc, char **argv)
opt_complementary = "x-x";
#endif
- op = getopt32(argc, argv, "FIlnrdvxt:i:m:p:q:s:w:z:f:"
+ op = getopt32(argv, "FIlnrdvxt:i:m:p:q:s:w:z:f:"
#if ENABLE_FEATURE_TRACEROUTE_SOURCE_ROUTE
"g:"
#endif
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index f0a3351fd..961a1712a 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -215,7 +215,7 @@ int udhcpc_main(int argc, char **argv)
#if ENABLE_GETOPT_LONG
applet_long_options = udhcpc_longopts;
#endif
- opt = getopt32(argc, argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vS",
+ opt = getopt32(argv, "c:CV:fbH:h:F:i:np:qRr:s:T:t:vS",
&str_c, &str_V, &str_h, &str_h, &str_F,
&client_config.interface, &client_config.pidfile, &str_r,
&client_config.script, &str_T, &str_t
diff --git a/networking/udhcp/dhcpd.c b/networking/udhcp/dhcpd.c
index 2fd16ce9b..e722833e1 100644
--- a/networking/udhcp/dhcpd.c
+++ b/networking/udhcp/dhcpd.c
@@ -36,7 +36,7 @@ int udhcpd_main(int argc, char **argv)
struct option_set *option;
struct dhcpOfferedAddr *lease, static_lease;
- opt = getopt32(argc, argv, "fS");
+ opt = getopt32(argv, "fS");
argv += optind;
if (!(opt & 1)) { /* no -f */
diff --git a/networking/udhcp/dumpleases.c b/networking/udhcp/dumpleases.c
index a0765be79..3e931c0b5 100644
--- a/networking/udhcp/dumpleases.c
+++ b/networking/udhcp/dumpleases.c
@@ -33,7 +33,7 @@ int dumpleases_main(int argc, char **argv)
applet_long_options = dumpleases_longopts;
#endif
opt_complementary = "=0:a--r:r--a";
- opt = getopt32(argc, argv, "arf:", &file);
+ opt = getopt32(argv, "arf:", &file);
fd = xopen(file, O_RDONLY);
diff --git a/networking/wget.c b/networking/wget.c
index 3e61ea656..8af7a3399 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -147,7 +147,7 @@ int wget_main(int argc, char **argv)
#endif
/* server.allocated = target.allocated = NULL; */
opt_complementary = "-1" USE_FEATURE_WGET_LONG_OPTIONS(":\xfe::");
- opt = getopt32(argc, argv, "csqO:P:Y:U:",
+ opt = getopt32(argv, "csqO:P:Y:U:",
&fname_out, &dir_prefix,
&proxy_flag, &user_agent
USE_FEATURE_WGET_LONG_OPTIONS(, &headers_llist)
diff --git a/networking/zcip.c b/networking/zcip.c
index 0b5bebec4..2f0b5a7fb 100644
--- a/networking/zcip.c
+++ b/networking/zcip.c
@@ -203,7 +203,7 @@ int zcip_main(int argc, char **argv)
// parse commandline: prog [options] ifname script
// exactly 2 args; -v accumulates and implies -f
opt_complementary = "=2:vv:vf";
- opts = getopt32(argc, argv, "fqr:v", &r_opt, &verbose);
+ opts = getopt32(argv, "fqr:v", &r_opt, &verbose);
if (!FOREGROUND) {
/* Do it early, before all bb_xx_msg calls */
openlog(applet_name, 0, LOG_DAEMON);