diff --git a/lib/libc/gen/getgrouplist.c b/lib/libc/gen/getgrouplist.c index 41eaf5e814f..10c4df76f3e 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; }