afs_linux_pag_from_groups: Stop checking for NOGROUP sentinel
authorAnders Kaseorg <andersk@mit.edu>
Tue, 5 Nov 2013 06:11:15 +0000 (01:11 -0500)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 5 Nov 2013 19:44:04 +0000 (11:44 -0800)
Linux hasn’t used NOGROUP as a sentinel like this since before kernel
2.1.12, and OpenAFS hasn’t used it on Linux since commit
109927bf6f54b58b76ac48ba41c2012c74937fed (Remove pre-Linux 2.6
support).

Change-Id: I0b18de8e5d9b6cd9b20da43ed050163c2d8651ff
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10426
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/afs/LINUX/osi_groups.c

index 9916d2b..88eeb61 100644 (file)
@@ -37,8 +37,8 @@ afs_linux_pag_from_groups(struct group_info *group_info) {
     if (group_info->ngroups < NUMPAGGROUPS)
        return NOPAG;
 
-    for (i = 0; (i < group_info->ngroups &&
-                (g0 = GROUP_AT(group_info, i)) != (gid_t) NOGROUP); i++) {
+    for (i = 0; i < group_info->ngroups; i++) {
+       g0 = GROUP_AT(group_info, i);
        if (((g0 >> 24) & 0xff) == 'A')
            return g0;
     }