From: Timo Sirainen Date: Tue, 25 Jul 2017 06:43:56 +0000 (+0300) Subject: lib: Fix static analyzer warnings in var-expand-if X-Git-Tag: 2.2.33.rc1~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5ef27b9d1b198dcb04b3588c25d5208876ccb7ef;p=thirdparty%2Fdovecot%2Fcore.git lib: Fix static analyzer warnings in var-expand-if --- diff --git a/src/lib/var-expand-if.c b/src/lib/var-expand-if.c index 2181421b03..c89b36003e 100644 --- a/src/lib/var-expand-if.c +++ b/src/lib/var-expand-if.c @@ -133,6 +133,7 @@ static int var_expand_if_comp(const char *lhs, const char *_op, const char *rhs, return 0; case OP_STR_NOT_REGEXP: neg = TRUE; + /* fall through */ case OP_STR_REGEXP: { int ec; bool res; @@ -157,7 +158,7 @@ static int var_expand_if_comp(const char *lhs, const char *_op, const char *rhs, if NOT_REGEXP, neg == TRUE and res should be FALSE if REGEXP, ned == FALSE, and res should be TRUE */ - *result_r = !res == neg; + *result_r = res != neg; return 0; } default: