From: Nathan Neulinger Date: Sat, 8 Jun 2002 01:18:35 +0000 (+0000) Subject: STABLE12-pioctl-avoid-inadvertantly-setting-new-pags-due-to-gcc-20020516 X-Git-Tag: openafs-stable-1_2_5~13 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8c0967a05551513a1209a57272a2f900148b64db;p=packages%2Fo%2Fopenafs.git STABLE12-pioctl-avoid-inadvertantly-setting-new-pags-due-to-gcc-20020516 some versions of gcc compile the if used to decide whether to allocate a pag badly. make life easier. (cherry picked from commit 10486b5652f0fb5a1d8c1fe5ddbbf5daa2477974) --- diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index d11b8c4f7..c3fc03bb4 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -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; }