From b5fd1704b252e24185d04074fcbc423b1f5004eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Fri, 17 Feb 1995 19:45:21 +0000 Subject: [PATCH] Bruce pointed out, that a misleading warning would be issued in an (unlikely) border case (maxgroups==1 and the user is on an /etc/group line for the same group and that group only ...). Now this case is dealt with as before ... --- lib/libc/gen/getgrouplist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 41eaf5e814f6..10c4df76f3e8 100644 --- a/lib/libc/gen/getgrouplist.c +++ b/lib/libc/gen/getgrouplist.c @@ -70,7 +70,7 @@ getgrouplist(uname, agroup, groups, grpcnt) */ setgrent(); while (grp = getgrent()) { - for (i = 1; i < ngroups; i++) { + for (i = 0; i < ngroups; i++) { if (grp->gr_gid == groups[i]) goto skip; }