summaryrefslogtreecommitdiff
path: root/networking/ifconfig.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-21 20:32:38 +0000
committerDenis Vlasenko2006-11-21 20:32:38 +0000
commit5096246ffb22b46b7d9e9debf035112a11d339b3 (patch)
treefaa1091c6485deaafccc5ca5bcdb2f34b2b90432 /networking/ifconfig.c
parentf8c8bb116007ef1d3856a4e302229f0c47bc1499 (diff)
downloadbusybox-5096246ffb22b46b7d9e9debf035112a11d339b3.zip
busybox-5096246ffb22b46b7d9e9debf035112a11d339b3.tar.gz
ifconfig: looks like char host[128] is not really needed.
Diffstat (limited to 'networking/ifconfig.c')
-rw-r--r--networking/ifconfig.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index c898de5..00dc455 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -290,7 +290,8 @@ int ifconfig_main(int argc, char **argv)
unsigned char did_flags;
#endif
char *p;
- char host[128];
+ /*char host[128];*/
+ const char *host = NULL; /* make gcc happy */
goterr = 0;
did_flags = 0;
@@ -376,8 +377,8 @@ int ifconfig_main(int argc, char **argv)
char *prefix;
int prefix_len = 0;
#endif
-
- safe_strncpy(host, *argv, (sizeof host));
+ /*safe_strncpy(host, *argv, (sizeof host));*/
+ host = *argv;
#if ENABLE_FEATURE_IPV6
prefix = strchr(host, '/');
if (prefix) {
@@ -453,7 +454,8 @@ int ifconfig_main(int argc, char **argv)
if (strcmp("ether", *argv) || (*++argv == NULL)) {
bb_show_usage();
}
- safe_strncpy(host, *argv, sizeof(host));
+ /*safe_strncpy(host, *argv, sizeof(host));*/
+ host = *argv;
if (in_ether(host, &sa)) {
bb_error_msg("invalid hw-addr %s", host);
++goterr;