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

src/afs/afs_pioctl.c

index 4266d75f0660d900564f71ff74e8b4b282ef8d56..9a35f89026d490449d2340ffbe7d6a90b7e5daa2 100644 (file)
@@ -1435,7 +1435,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;
       }