svn commit: trunk/busybox/networking
vda at busybox.net
vda at busybox.net
Tue Nov 21 20:32:38 UTC 2006
Author: vda
Date: 2006-11-21 12:32:38 -0800 (Tue, 21 Nov 2006)
New Revision: 16611
Log:
ifconfig: looks like char host[128] is not really needed.
Modified:
trunk/busybox/networking/ifconfig.c
Changeset:
Modified: trunk/busybox/networking/ifconfig.c
===================================================================
--- trunk/busybox/networking/ifconfig.c 2006-11-21 19:10:26 UTC (rev 16610)
+++ trunk/busybox/networking/ifconfig.c 2006-11-21 20:32:38 UTC (rev 16611)
@@ -290,7 +290,8 @@
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 @@
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 @@
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;
More information about the busybox-cvs
mailing list