diff options
-rw-r--r-- | tests/nl-test-util.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/nl-test-util.c b/tests/nl-test-util.c index 6bbe2ae..1503907 100644 --- a/tests/nl-test-util.c +++ b/tests/nl-test-util.c @@ -1000,14 +1000,7 @@ void _nltst_assert_route_list(struct nl_object *const *objs, ssize_t len, size_t l; size_t i; - if (len < 0) { - l = 0; - if (objs) { - while (objs[l]) - l++; - } - } else - l = len; + l = _nl_ptrarray_len(objs, len); for (i = 0; i < l; i++) { struct nl_object *route = objs[i]; |