From a1551b78e9ac0e2075ca241c0e8ae361758f26b4 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 10 Dec 2022 15:39:39 -0800 Subject: Replace && with & for bitwise comparison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- keytypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3