Skip to content

Commit

Permalink
lib-sieve: regex extension: Fixed invalid use of sieve_ast_stringlist…
Browse files Browse the repository at this point in the history
…_map().

Mixed up bool and int return types.
Found with clang -Wstrict-bool.
  • Loading branch information
stephanbosch committed Aug 25, 2016
1 parent dabacd9 commit d2fa720
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib-sieve/plugins/regex/mcht-regex.c
Expand Up @@ -100,11 +100,11 @@ static int mcht_regex_validate_regexp
str_sanitize(regex_str, 128), _regexp_error(&regexp, ret));

regfree(&regexp);
return FALSE;
return -1;
}

regfree(&regexp);
return TRUE;
return 1;
}

struct _regex_key_context {
Expand All @@ -126,7 +126,7 @@ static int mcht_regex_validate_key_argument
(keyctx->valdtr, keyctx->mtctx, key, keyctx->cflags);
}

return TRUE;
return 1;
}

static bool mcht_regex_validate_context
Expand Down Expand Up @@ -158,8 +158,8 @@ static bool mcht_regex_validate_context
keyctx.cflags = cflags;

kitem = key_arg;
if ( !sieve_ast_stringlist_map(&kitem, (void *) &keyctx,
mcht_regex_validate_key_argument) )
if ( sieve_ast_stringlist_map(&kitem, (void *) &keyctx,
mcht_regex_validate_key_argument) <= 0 )
return FALSE;

return TRUE;
Expand Down

0 comments on commit d2fa720

Please sign in to comment.