diff options
author | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-09-18 14:08:40 +0000 |
commit | d8ac4091605cafeed429956439b3365036470356 (patch) | |
tree | 86f85152c10afe3de06afc06d7738c614a3210cb /lib/libc/gen/getpwent.c | |
parent | 2d831c7d21d4e39820d9fe862e7ec818476c083b (diff) | |
download | FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.zip FreeBSD-src-d8ac4091605cafeed429956439b3365036470356.tar.gz |
Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.
PR: 2752
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>
Diffstat (limited to 'lib/libc/gen/getpwent.c')
-rw-r--r-- | lib/libc/gen/getpwent.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index 9a19a15..dfe5d34 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -424,7 +424,7 @@ grpagain: latch++; } again: - if (getnetgrent(&host, &user, &domain) == NULL) { + if (getnetgrent(&host, &user, &domain) == 0) { if ((gr = getgrnam(grp+2)) != NULL) goto grpagain; latch = 0; @@ -448,7 +448,7 @@ again: if (grp[1] == '@') { setnetgrent(grp+2); rv = 0; - while(getnetgrent(&host, &user, &domain) != NULL) { + while(getnetgrent(&host, &user, &domain) != 0) { store(user); rv++; } |