From 7b8c9b01882788d5112b0a529bf74163805889d3 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Fri, 8 Jul 2016 13:37:10 +0200
Subject: [PATCH 15/18] sysdb-tests: Fix cast from pointer to integer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
src/tests/sysdb-tests.c: In function 'test_sysdb_memberof_close_loop':
src/tests/sysdb-tests.c:2740:5: warning: passing argument
1 of '_ck_assert_msg' makes integer from pointer without a cast
[enabled by default]
fail_unless(data->attrlist[0], "talloc_array failed.");
^
In file included from src/tests/sysdb-tests.c:23:0:
/usr/include/check.h:237:16: note: expected 'int' but argument
is of type 'const char *'
void CK_EXPORT _ck_assert_msg (int result, const char *file,
^
Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit 2bb9e88328ef44eddd935c250ae12337442c5900)
---
src/tests/sysdb-tests.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index 429aa39538901fe387e41eebb27662d7b958142c..bac8a8788b4fde0d6039121efead6fc20fa046f9 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -2737,7 +2737,7 @@ START_TEST (test_sysdb_memberof_close_loop)
fail_unless(data->attrlist != NULL, "talloc_array failed.");
data->attrlist[0] = test_asprintf_fqname(data, test_ctx->domain,
"testgroup%d", data->gid + 9);
- fail_unless(data->attrlist[0], "talloc_array failed.");
+ fail_unless(data->attrlist[0] != NULL, "talloc_array failed.");
data->attrlist[1] = NULL;
ret = test_memberof_store_group(data);
--
2.4.11