summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-07-08 19:13:18 +0000
committerngie <ngie@FreeBSD.org>2016-07-08 19:13:18 +0000
commitc4a765ce71d4c5b6b00ca3eb1258daa4dbed65cb (patch)
tree358933bdb6c86e2b0a077c5b503f7ded5fd5341a /lib
parentffd95dd99b17d9d58cb49cfff95cb1f56c7e6277 (diff)
downloadFreeBSD-src-c4a765ce71d4c5b6b00ca3eb1258daa4dbed65cb.zip
FreeBSD-src-c4a765ce71d4c5b6b00ca3eb1258daa4dbed65cb.tar.gz
MFC r301708:
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 Pointyhat to: ngie
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/net/getnetbyht.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c
index d5d89a8..bee00e8 100644
--- a/lib/libc/net/getnetbyht.c
+++ b/lib/libc/net/getnetbyht.c
@@ -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;
}
OpenPOWER on IntegriCloud