Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 58633 | Differences between
and this patch

Collapse All | Expand All

(-)/home/ecki/NET-TOOLS/net-tools-1.60.org/lib/interface.c (-10 / +13 lines)
Lines 198-204 Link Here
198
    return err;
198
    return err;
199
}
199
}
200
200
201
static char *get_name(char *name, char *p)
201
char *get_name(char *name, char *p)
202
{
202
{
203
    while (isspace(*p))
203
    while (isspace(*p))
204
	p++;
204
	p++;
Lines 206-221 Link Here
206
	if (isspace(*p))
206
	if (isspace(*p))
207
	    break;
207
	    break;
208
	if (*p == ':') {	/* could be an alias */
208
	if (*p == ':') {	/* could be an alias */
209
	    char *dot = p, *dotname = name;
209
		char *dot = p++;
210
	    *name++ = *p++;
210
 		while (*p && isdigit(*p)) p++;
211
	    while (isdigit(*p))
211
		if (*p == ':') {
212
		*name++ = *p++;
212
			/* Yes it is, backup and copy it. */
213
	    if (*p != ':') {	/* it wasn't, backup */
213
			p = dot;
214
		p = dot;
214
			*name++ = *p++;
215
		name = dotname;
215
			while (*p && isdigit(*p)) {
216
				*name++ = *p++;
217
			}
218
		} else {
219
			/* No, it isn't */
220
			p = dot;
216
	    }
221
	    }
217
	    if (*p == '\0')
218
		return NULL;
219
	    p++;
222
	    p++;
220
	    break;
223
	    break;
221
	}
224
	}

Return to bug 58633