From: Mark Wooding Date: Wed, 18 Sep 2019 17:35:34 +0000 (+0100) Subject: key/key-misc.c: Fix bogus parentheses in macro. X-Git-Tag: 2.4.3~3 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/commitdiff_plain/b119a5eb97e0a36b825d616aaaaae53689ccbe6c?hp=354ea7a4eecb1c4046bebacc19cad55a5b571ec0 key/key-misc.c: Fix bogus parentheses in macro. The old, bogus behaviour was that it would report `KERR_READONLY' if the keyring was neither open for writing, /nor/ modified. I think this is relatively benign, but still well deserving of fixing. Spotted by Clang. (cherry picked from commit 924c7057076a23e322d40693912633dc546867e9) --- diff --git a/key/key-misc.c b/key/key-misc.c index 80e9597d..c3442f28 100644 --- a/key/key-misc.c +++ b/key/key-misc.c @@ -42,7 +42,7 @@ /*----- Useful macros -----------------------------------------------------*/ #define KEY_WRITE(f) do { \ - if (!(f)->f & KF_WRITE) \ + if (!((f)->f & KF_WRITE)) \ return (KERR_READONLY); \ } while (0)