Mercurial > dovecot > core-2.2
diff src/lib/var-expand-if.c @ 22542:74fdc86524ef
lib: Fix static analyzer warnings in var-expand-if
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 25 Jul 2017 09:43:56 +0300 |
parents | 1fc29e34ee3d |
children | 4dd4e41cd4a1 |
line wrap: on
line diff
--- a/src/lib/var-expand-if.c Mon Jul 24 18:30:01 2017 +0300 +++ b/src/lib/var-expand-if.c Tue Jul 25 09:43:56 2017 +0300 @@ -133,6 +133,7 @@ return 0; case OP_STR_NOT_REGEXP: neg = TRUE; + /* fall through */ case OP_STR_REGEXP: { int ec; bool res; @@ -157,7 +158,7 @@ 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: