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: eeae8906db ("util: return the number of elements from strv_from_string")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
This commit is contained in:
José Expósito 2022-11-14 19:06:07 +01:00
parent eeae8906db
commit 955a9cc338

View file

@ -1105,9 +1105,9 @@ START_TEST(strsplit_test)
/* When there are no elements validate return value is Null, /* When there are no elements validate return value is Null,
otherwise validate result array is Null terminated. */ otherwise validate result array is Null terminated. */
if(t->nresults == 0) if(t->nresults == 0)
ck_assert_ptr_null(strv); ck_assert_ptr_eq(strv, NULL);
else else
ck_assert_ptr_null(strv[t->nresults]); ck_assert_ptr_eq(strv[t->nresults], NULL);
strv_free(strv); strv_free(strv);
t++; t++;