Revert r301707
getnetent_p doesn't return NULL like getnetent does. coccinelle got confused and I didn't verify that it worked before committing the change MFC after: 1 week X-MFC with: r301707 Pointyhat to: ngie
This commit is contained in:
parent
140f884e31
commit
b7e992da8e
@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_data, va_list ap)
|
||||
}
|
||||
|
||||
_setnethtent(ned->stayopen, ned);
|
||||
while ((error = getnetent_p(&ne, ned)) == NULL) {
|
||||
while ((error = getnetent_p(&ne, ned)) == 0) {
|
||||
if (strcasecmp(ne.n_name, name) == 0)
|
||||
break;
|
||||
for (cp = ne.n_aliases; *cp != NULL; cp++)
|
||||
for (cp = ne.n_aliases; *cp != 0; cp++)
|
||||
if (strcasecmp(*cp, name) == 0)
|
||||
goto found;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user