Commit f96c1896 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Michael Tokarev
Browse files

tests/hbitmap: use ARRAY_SIZE macro



Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
parent 8f801baf
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -813,7 +813,7 @@ static void test_hbitmap_serialize_basic(TestHBitmapData *data,
    size_t buf_size;
    uint8_t *buf;
    uint64_t positions[] = { 0, 1, L1 - 1, L1, L2 - 1, L2, L2 + 1, L3 - 1 };
    int num_positions = sizeof(positions) / sizeof(positions[0]);
    int num_positions = ARRAY_SIZE(positions);

    hbitmap_test_init(data, L3, 0);
    g_assert(hbitmap_is_serializable(data->hb));
@@ -838,7 +838,7 @@ static void test_hbitmap_serialize_part(TestHBitmapData *data,
    size_t buf_size;
    uint8_t *buf;
    uint64_t positions[] = { 0, 1, L1 - 1, L1, L2 - 1, L2, L2 + 1, L3 - 1 };
    int num_positions = sizeof(positions) / sizeof(positions[0]);
    int num_positions = ARRAY_SIZE(positions);

    hbitmap_test_init(data, L3, 0);
    buf_size = L2;
@@ -880,7 +880,7 @@ static void test_hbitmap_serialize_zeroes(TestHBitmapData *data,
    int64_t next;
    uint64_t min_l1 = MAX(L1, 64);
    uint64_t positions[] = { 0, min_l1, L2, L3 - min_l1};
    int num_positions = sizeof(positions) / sizeof(positions[0]);
    int num_positions = ARRAY_SIZE(positions);

    hbitmap_test_init(data, L3, 0);