Skip to content

Commit

Permalink
lib: Fix static analyzer warnings in var-expand-if
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen authored and cmouse committed Sep 27, 2017
1 parent 587bf2f commit 5ef27b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/var-expand-if.c
Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit 5ef27b9

Please sign in to comment.