summaryrefslogtreecommitdiff
path: root/lib/libc/gen/pwcache.c
diff options
context:
space:
mode:
authorMike Pritchard <mpp@FreeBSD.org>1997-04-03 01:51:34 +0000
committerMike Pritchard <mpp@FreeBSD.org>1997-04-03 01:51:34 +0000
commit5d00c0a49935cc4ba172d6018729ca72bc562343 (patch)
treee1cd29907b617cb398a96dffa5ee1a0b2e96ab2f /lib/libc/gen/pwcache.c
parent353fe48bab2613943ea239e9f498d4dc2fc54d1c (diff)
Notes
Diffstat (limited to 'lib/libc/gen/pwcache.c')
-rw-r--r--lib/libc/gen/pwcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/pwcache.c b/lib/libc/gen/pwcache.c
index 3213f4b54b9c..aea7f5589e35 100644
--- a/lib/libc/gen/pwcache.c
+++ b/lib/libc/gen/pwcache.c
@@ -79,7 +79,7 @@ user_from_uid(uid, nouser)
return (NULL);
}
}
- return (cp->found ? cp->name : NULL);
+ return ((nouser && !cp->found) ? NULL : cp->name);
}
char *
@@ -115,5 +115,5 @@ group_from_gid(gid, nogroup)
return (NULL);
}
}
- return (cp->found ? cp->name : NULL);
+ return ((nogroup && !cp->found) ? NULL : cp->name);
}