diff options
author | ngie <ngie@FreeBSD.org> | 2016-06-08 23:23:19 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-06-08 23:23:19 +0000 |
commit | 294c1737c4d8903a3d2398191bb65f3b23506f60 (patch) | |
tree | c4c6a807b9c5070f8dada2c9ccfda89c1974947f /lib/libc | |
parent | fa07f7770edf128343766865cc6aef4605510ba7 (diff) | |
download | FreeBSD-src-294c1737c4d8903a3d2398191bb65f3b23506f60.zip FreeBSD-src-294c1737c4d8903a3d2398191bb65f3b23506f60.tar.gz |
Use NULL instead of `0` in _ht_getnetbyname(..)
- getnetent returns NULL on completion/error.
- .h_aliases is NULL terminated.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/getnetbyht.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c index bee00e8..d5d89a8 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)) == 0) { + while ((error = getnetent_p(&ne, ned)) == NULL) { if (strcasecmp(ne.n_name, name) == 0) break; - for (cp = ne.n_aliases; *cp != 0; cp++) + for (cp = ne.n_aliases; *cp != NULL; cp++) if (strcasecmp(*cp, name) == 0) goto found; } |