summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2022-11-14 19:06:07 +0100
committerJosé Expósito <jose.exposito89@gmail.com>2022-11-14 19:11:12 +0100
commit955a9cc338b7a1d6606a05ab6c0f5b7145806cf2 (patch)
tree4942962de91d5f25bf6631b6cb81cc0519bc1423
parenteeae8906dbbb5c0ebd505edfd3de0a6a2532e5c9 (diff)
downloadlibinput-955a9cc338b7a1d6606a05ab6c0f5b7145806cf2.tar.gz
util: use ck_assert_ptr_eq() instead of ck_assert_ptr_null()
The ck_assert_ptr_null() function is not available in the version of the check library included in 20.04 LTS Focal (0.10.0). Use ck_assert_ptr_eq() to avoid compilation errors. Fixes: eeae8906dbbb ("util: return the number of elements from strv_from_string") Signed-off-by: José Expósito <jose.exposito89@gmail.com>
-rw-r--r--test/test-utils.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test-utils.c b/test/test-utils.c
index 08bdd59a..ab3158a9 100644
--- a/test/test-utils.c
+++ b/test/test-utils.c
@@ -1097,17 +1097,17 @@ START_TEST(strsplit_test)
size_t nelem;
char **strv = strv_from_string(t->string, t->delim, &nelem);
- for (size_t idx = 0; idx < t->nresults; idx++)
+ for (size_t idx = 0; idx < t->nresults; idx++)
ck_assert_str_eq(t->results[idx], strv[idx]);
-
+
ck_assert_uint_eq(nelem, t->nresults);
-
+
/* When there are no elements validate return value is Null,
otherwise validate result array is Null terminated. */
if(t->nresults == 0)
- ck_assert_ptr_null(strv);
+ ck_assert_ptr_eq(strv, NULL);
else
- ck_assert_ptr_null(strv[t->nresults]);
+ ck_assert_ptr_eq(strv[t->nresults], NULL);
strv_free(strv);
t++;