diff options
author | phk <phk@FreeBSD.org> | 1995-10-22 14:37:11 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1995-10-22 14:37:11 +0000 |
commit | 5e221828f83731c9f6083e6ce9703c1251dba05a (patch) | |
tree | 021e4f00408640702c262fd5f8dc2c167a2c2c73 /lib/libc/gen/getgrent.c | |
parent | 6a09eeb50d1e12bcfae0a9e782727c535dc609f5 (diff) | |
download | FreeBSD-src-5e221828f83731c9f6083e6ce9703c1251dba05a.zip FreeBSD-src-5e221828f83731c9f6083e6ce9703c1251dba05a.tar.gz |
Minor cleanup, mostly unused vars and missing #includes.
Diffstat (limited to 'lib/libc/gen/getgrent.c')
-rw-r--r-- | lib/libc/gen/getgrent.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index 9ba9a71..6451dc9 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -163,7 +163,7 @@ start_gr() char *line; size_t linelen; _gr_yp_enabled = 0; - while(line = fgetln(_gr_fp, &linelen)) { + while((line = fgetln(_gr_fp, &linelen)) != NULL) { if(line[0] == '+') { if(line[1] && !_gr_yp_enabled) { _gr_yp_enabled = 1; @@ -301,6 +301,7 @@ grscan(search, gid, name) return(1); } /* NOTREACHED */ + return (0); } #ifdef YP @@ -425,7 +426,8 @@ unpack: strcpy(resultbuf, result); free(result); - if(result = strchr(resultbuf, '\n')) *result = '\0'; + if((result = strchr(resultbuf, '\n')) != NULL) + *result = '\0'; if (_gr_breakout_yp(gr, resultbuf)) return(1); else |