summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-10 15:39:39 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-12-11 15:36:06 -0800
commita1551b78e9ac0e2075ca241c0e8ae361758f26b4 (patch)
treebd7ef463c0f58e40698af91c69bd4f2a19a84320
parente4e821d5083072e796d6489ddcacf895a43c66f1 (diff)
Replace && with & for bitwise comparison
Clears up gcc warning: keytypes.c: In function ‘SetPreserve’: keytypes.c:757:26: warning: promoted ~unsigned is always non-zero [-Wsign-compare] || (new.preVMods && (~new.indexVMods))) ^~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--keytypes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/keytypes.c b/keytypes.c
index 1a77419..2dba53a 100644
--- a/keytypes.c
+++ b/keytypes.c
@@ -754,7 +754,7 @@ SetPreserve(KeyTypeInfo * type,
new.preMods = rtrn.uval & 0xff;
new.preVMods = (rtrn.uval >> 16) & 0xffff;
if ((new.preMods & (~new.indexMods))
- || (new.preVMods && (~new.indexVMods)))
+ || (new.preVMods & (~new.indexVMods)))
{
if (warningLevel > 0)
{