]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE12-pioctl-avoid-inadvertantly-setting-new-pags-due-to-gcc-20020516
authorNathan Neulinger <nneul@umr.edu>
Sat, 8 Jun 2002 01:18:35 +0000 (01:18 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 8 Jun 2002 01:18:35 +0000 (01:18 +0000)
some versions of gcc compile the if used to decide whether to allocate a pag
badly. make life easier.

(cherry picked from commit 10486b5652f0fb5a1d8c1fe5ddbbf5daa2477974)

src/afs/afs_pioctl.c

index d11b8c4f785cfb265dc422a273b7e3bee5ff2efa..c3fc03bb4d06aa4cc7ec93a8e42ae5ec1af0158a 100644 (file)
@@ -1414,7 +1414,8 @@ static PGCPAGs(avc, afun, areq, ain, aout, ainSize, aoutSize, acred)
       memcpy((char *)&flag, ain, sizeof(afs_int32));           /* primary id flag */
       ain += sizeof(afs_int32);                        /* skip id field */
       /* rest is cell name, look it up */
-      if (flag & 0x8000) {                     /* XXX Use Constant XXX */
+      /* some versions of gcc appear to need != 0 in order to get this right */
+      if (flag & 0x8000 != 0) {                        /* XXX Use Constant XXX */
          flag &= ~0x8000;
          set_parent_pag = 1;
       }