aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-21 20:32:38 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-21 20:32:38 +0000
commit5096246ffb22b46b7d9e9debf035112a11d339b3 (patch)
treefaa1091c6485deaafccc5ca5bcdb2f34b2b90432
parentf8c8bb116007ef1d3856a4e302229f0c47bc1499 (diff)
downloadbusybox-w32-5096246ffb22b46b7d9e9debf035112a11d339b3.tar.gz
busybox-w32-5096246ffb22b46b7d9e9debf035112a11d339b3.tar.bz2
busybox-w32-5096246ffb22b46b7d9e9debf035112a11d339b3.zip
ifconfig: looks like char host[128] is not really needed.
-rw-r--r--networking/ifconfig.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c
index c898de543..00dc455b0 100644
--- a/networking/ifconfig.c
+++ b/networking/ifconfig.c
@@ -290,7 +290,8 @@ int ifconfig_main(int argc, char **argv)
290 unsigned char did_flags; 290 unsigned char did_flags;
291#endif 291#endif
292 char *p; 292 char *p;
293 char host[128]; 293 /*char host[128];*/
294 const char *host = NULL; /* make gcc happy */
294 295
295 goterr = 0; 296 goterr = 0;
296 did_flags = 0; 297 did_flags = 0;
@@ -376,8 +377,8 @@ int ifconfig_main(int argc, char **argv)
376 char *prefix; 377 char *prefix;
377 int prefix_len = 0; 378 int prefix_len = 0;
378#endif 379#endif
379 380 /*safe_strncpy(host, *argv, (sizeof host));*/
380 safe_strncpy(host, *argv, (sizeof host)); 381 host = *argv;
381#if ENABLE_FEATURE_IPV6 382#if ENABLE_FEATURE_IPV6
382 prefix = strchr(host, '/'); 383 prefix = strchr(host, '/');
383 if (prefix) { 384 if (prefix) {
@@ -453,7 +454,8 @@ int ifconfig_main(int argc, char **argv)
453 if (strcmp("ether", *argv) || (*++argv == NULL)) { 454 if (strcmp("ether", *argv) || (*++argv == NULL)) {
454 bb_show_usage(); 455 bb_show_usage();
455 } 456 }
456 safe_strncpy(host, *argv, sizeof(host)); 457 /*safe_strncpy(host, *argv, sizeof(host));*/
458 host = *argv;
457 if (in_ether(host, &sa)) { 459 if (in_ether(host, &sa)) {
458 bb_error_msg("invalid hw-addr %s", host); 460 bb_error_msg("invalid hw-addr %s", host);
459 ++goterr; 461 ++goterr;