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:
Enji Cooper 2016-06-08 23:30:13 +00:00
parent 140f884e31
commit b7e992da8e

View File

@ -215,10 +215,10 @@ _ht_getnetbyname(void *rval, void *cb_data, va_list ap)
} }
_setnethtent(ned->stayopen, ned); _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) if (strcasecmp(ne.n_name, name) == 0)
break; break;
for (cp = ne.n_aliases; *cp != NULL; cp++) for (cp = ne.n_aliases; *cp != 0; cp++)
if (strcasecmp(*cp, name) == 0) if (strcasecmp(*cp, name) == 0)
goto found; goto found;
} }