From: Stefan Metzmacher Date: Mon, 23 Jul 2018 21:24:22 +0000 (+0200) Subject: pthreadpool: replace assert_return_code(ret, 0); with assert_int_equal(ret, 0); X-Git-Tag: ldb-1.5.0~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c51cae583fd119db613c62bd53070d7d53227c56;p=thirdparty%2Fsamba.git pthreadpool: replace assert_return_code(ret, 0); with assert_int_equal(ret, 0); We need to assert the exact value! Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/lib/pthreadpool/tests_cmocka.c b/lib/pthreadpool/tests_cmocka.c index e2fb8439428..e6af8849f01 100644 --- a/lib/pthreadpool/tests_cmocka.c +++ b/lib/pthreadpool/tests_cmocka.c @@ -51,19 +51,19 @@ static int setup_pthreadpool_tevent(void **state) assert_non_null(t->ev); ret = pthreadpool_tevent_init(t->ev, UINT_MAX, &t->upool); - assert_return_code(ret, 0); + assert_int_equal(ret, 0); max_threads = pthreadpool_tevent_max_threads(t->upool); assert_int_equal(max_threads, UINT_MAX); ret = pthreadpool_tevent_init(t->ev, 1, &t->opool); - assert_return_code(ret, 0); + assert_int_equal(ret, 0); max_threads = pthreadpool_tevent_max_threads(t->opool); assert_int_equal(max_threads, 1); ret = pthreadpool_tevent_init(t->ev, 0, &t->spool); - assert_return_code(ret, 0); + assert_int_equal(ret, 0); max_threads = pthreadpool_tevent_max_threads(t->spool); assert_int_equal(max_threads, 0);