mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 16:31:24 +00:00
ifconfig: looks like char host[128] is not really needed.
This commit is contained in:
parent
f8c8bb1160
commit
5096246ffb
@ -290,7 +290,8 @@ int ifconfig_main(int argc, char **argv)
|
|||||||
unsigned char did_flags;
|
unsigned char did_flags;
|
||||||
#endif
|
#endif
|
||||||
char *p;
|
char *p;
|
||||||
char host[128];
|
/*char host[128];*/
|
||||||
|
const char *host = NULL; /* make gcc happy */
|
||||||
|
|
||||||
goterr = 0;
|
goterr = 0;
|
||||||
did_flags = 0;
|
did_flags = 0;
|
||||||
@ -376,8 +377,8 @@ int ifconfig_main(int argc, char **argv)
|
|||||||
char *prefix;
|
char *prefix;
|
||||||
int prefix_len = 0;
|
int prefix_len = 0;
|
||||||
#endif
|
#endif
|
||||||
|
/*safe_strncpy(host, *argv, (sizeof host));*/
|
||||||
safe_strncpy(host, *argv, (sizeof host));
|
host = *argv;
|
||||||
#if ENABLE_FEATURE_IPV6
|
#if ENABLE_FEATURE_IPV6
|
||||||
prefix = strchr(host, '/');
|
prefix = strchr(host, '/');
|
||||||
if (prefix) {
|
if (prefix) {
|
||||||
@ -453,7 +454,8 @@ int ifconfig_main(int argc, char **argv)
|
|||||||
if (strcmp("ether", *argv) || (*++argv == NULL)) {
|
if (strcmp("ether", *argv) || (*++argv == NULL)) {
|
||||||
bb_show_usage();
|
bb_show_usage();
|
||||||
}
|
}
|
||||||
safe_strncpy(host, *argv, sizeof(host));
|
/*safe_strncpy(host, *argv, sizeof(host));*/
|
||||||
|
host = *argv;
|
||||||
if (in_ether(host, &sa)) {
|
if (in_ether(host, &sa)) {
|
||||||
bb_error_msg("invalid hw-addr %s", host);
|
bb_error_msg("invalid hw-addr %s", host);
|
||||||
++goterr;
|
++goterr;
|
||||||
|
Loading…
Reference in New Issue
Block a user