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.3.0.rc1~1216 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac225e892630ecfdbbd09afe27887edd13d4697b;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 98e03c5528..47c0cc8a88 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; @@ -158,7 +159,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: