From: Rob Landley Date: Tue, 20 Jun 2006 21:13:29 +0000 (-0000) Subject: Patch by Robert P. Day to remove obsolete alias code that the 2.4 and 2.6 X-Git-Tag: 1_2_0~107 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9fe801e0d2a3a30855481d125980f7bbcd857920;p=oweals%2Fbusybox.git Patch by Robert P. Day to remove obsolete alias code that the 2.4 and 2.6 Linux kernels don't do anymore. --- diff --git a/networking/interface.c b/networking/interface.c index 964665c71..f5937ef3f 100644 --- a/networking/interface.c +++ b/networking/interface.c @@ -129,7 +129,7 @@ static struct aftype inet_aftype = { .name = "inet", .title = "DARPA Internet", .af = AF_INET, - .alen = sizeof(unsigned long), + .alen = 4, .sprint = INET_sprint, .fd = -1 }; @@ -444,22 +444,16 @@ static int if_readconf(void) static char *get_name(char *name, char *p) { - /* Extract [:] from nul-terminated p where p matches - [:]: after leading whitespace. + /* Extract from nul-terminated p where p matches + : after leading whitespace. If match is not made, set name empty and return unchanged p */ - int namestart=0, nameend=0, aliasend; + int namestart=0, nameend=0; while (isspace(p[namestart])) namestart++; nameend=namestart; while (p[nameend] && p[nameend]!=':' && !isspace(p[nameend])) nameend++; if (p[nameend]==':') { - aliasend=nameend+1; - while (p[aliasend] && isdigit(p[aliasend])) - aliasend++; - if (p[aliasend]==':') { - nameend=aliasend; - } if ((nameend-namestart)