diff options
Diffstat (limited to 'src/passwd/getgrouplist.c')
-rw-r--r-- | src/passwd/getgrouplist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passwd/getgrouplist.c b/src/passwd/getgrouplist.c index 0fddc9a1..43e51824 100644 --- a/src/passwd/getgrouplist.c +++ b/src/passwd/getgrouplist.c @@ -28,7 +28,7 @@ int getgrouplist(const char *user, gid_t gid, gid_t *groups, int *ngroups) f = __nscd_query(GETINITGR, user, resp, sizeof resp, &swap); if (!f) goto cleanup; - if (f != (FILE*)-1 && resp[INITGRFOUND]) { + if (resp[INITGRFOUND]) { nscdbuf = calloc(resp[INITGRNGRPS], sizeof(uint32_t)); if (!nscdbuf) goto cleanup; if (!fread(nscdbuf, sizeof(*nscdbuf)*resp[INITGRNGRPS], 1, f)) { @@ -40,7 +40,7 @@ int getgrouplist(const char *user, gid_t gid, gid_t *groups, int *ngroups) nscdbuf[i] = bswap_32(nscdbuf[i]); } } - if (f != (FILE*)-1) fclose(f); + fclose(f); f = fopen("/etc/group", "rbe"); if (!f && errno != ENOENT && errno != ENOTDIR) |