From: Vincent Bernat Date: Fri, 3 Apr 2020 20:34:18 +0000 (+0200) Subject: tests: fix bitmap test on 32bit X-Git-Tag: 1.0.6~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f6f82b696c529b0c764ba1843848498aa0ed8a8;p=thirdparty%2Flldpd.git tests: fix bitmap test on 32bit --- diff --git a/tests/check_bitmap.c b/tests/check_bitmap.c index 0fe63d53..dfaefd60 100644 --- a/tests/check_bitmap.c +++ b/tests/check_bitmap.c @@ -40,8 +40,8 @@ START_TEST(test_some_bits) { bitmap_set(vlan_bmap, 6); bitmap_set(vlan_bmap, 31); bitmap_set(vlan_bmap, 50); - ck_assert_int_eq(vlan_bmap[0], (1L << 1) | (1L << 6) | (1L << 31)); - ck_assert_int_eq(vlan_bmap[1], (1L << (50-32))); + ck_assert_int_eq(vlan_bmap[0], (1UL << 1) | (1UL << 6) | (1UL << 31)); + ck_assert_int_eq(vlan_bmap[1], (1UL << (50-32))); ck_assert_int_eq(vlan_bmap[2], 0); ck_assert_int_eq(bitmap_numbits(vlan_bmap), 4); }