From 561d0adcdf44a7c258d78d2a862ea4bca3010352 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan@rename-it.nl>
Date: Mon, 20 Jun 2016 23:08:09 +0200
Subject: [PATCH] lib-sieve: address test: Mixed up bool and int for
 sieve_ast_stringlist_map() return type.

---
 src/lib-sieve/tst-address.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/lib-sieve/tst-address.c b/src/lib-sieve/tst-address.c
index 4dd0f642d..ed6c46dea 100644
--- a/src/lib-sieve/tst-address.c
+++ b/src/lib-sieve/tst-address.c
@@ -129,15 +129,15 @@ static int _header_is_allowed
 		const char * const *hdsp = _allowed_headers;
 		while ( *hdsp != NULL ) {
 			if ( strcasecmp( *hdsp, header ) == 0 )
-				return TRUE;
+				return 1;
 
 			hdsp++;
 		}
 
-		return FALSE;
+		return 0;
 	}
 
-	return TRUE;
+	return 1;
 }
 
 static bool tst_address_validate
@@ -165,7 +165,8 @@ static bool tst_address_validate
 	 *   FIXME: verify dynamic header names at runtime
 	 */
 	header = arg;
-	if ( !sieve_ast_stringlist_map(&header, NULL, _header_is_allowed) ) {
+	if ( sieve_ast_stringlist_map
+		(&header, NULL, _header_is_allowed) <= 0 ) {
 		sieve_argument_validate_error(valdtr, header,
 			"specified header '%s' is not allowed for the address test",
 			str_sanitize(sieve_ast_strlist_strc(header), 64));
-- 
GitLab