diff options
Diffstat (limited to 'tests/lib')
| -rw-r--r-- | tests/lib/test_privs.c | 2 | ||||
| -rw-r--r-- | tests/lib/test_srcdest_table.c | 2 | ||||
| -rw-r--r-- | tests/lib/test_table.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/test_privs.c b/tests/lib/test_privs.c index e203da8f6e..fc3d908661 100644 --- a/tests/lib/test_privs.c +++ b/tests/lib/test_privs.c @@ -37,7 +37,7 @@ struct zebra_privs_t test_privs = { .vty_group = VTY_GROUP, #endif .caps_p = _caps_p, - .cap_num_p = sizeof(_caps_p) / sizeof(_caps_p[0]), + .cap_num_p = array_size(_caps_p), .cap_num_i = 0}; struct option longopts[] = {{"help", no_argument, NULL, 'h'}, diff --git a/tests/lib/test_srcdest_table.c b/tests/lib/test_srcdest_table.c index 5c0e171778..19a40b2184 100644 --- a/tests/lib/test_srcdest_table.c +++ b/tests/lib/test_srcdest_table.c @@ -105,7 +105,7 @@ static unsigned int log_key(void *data) static bool log_cmp(const void *a, const void *b) { if (a == NULL || b == NULL) - return 0; + return false; return !memcmp(a, b, 2 * sizeof(struct prefix)); } diff --git a/tests/lib/test_table.c b/tests/lib/test_table.c index 2b65040627..90d6c76bf1 100644 --- a/tests/lib/test_table.c +++ b/tests/lib/test_table.c @@ -478,7 +478,7 @@ static void test_iter_pause(void) const char *prefixes[] = {"1.0.1.0/24", "1.0.1.0/25", "1.0.1.128/25", "1.0.2.0/24", "2.0.0.0/8"}; - num_prefixes = sizeof(prefixes) / sizeof(prefixes[0]); + num_prefixes = array_size(prefixes); printf("\n\nTesting that route_table_iter_pause() works as expected\n"); table = route_table_init(); |
