]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests: fix bitmap test on 32bit
authorVincent Bernat <vincent@bernat.ch>
Fri, 3 Apr 2020 20:34:18 +0000 (22:34 +0200)
committerVincent Bernat <vincent@bernat.ch>
Fri, 3 Apr 2020 20:34:18 +0000 (22:34 +0200)
tests/check_bitmap.c

index 0fe63d53d796bc48e442c1255376d5e32932e3f4..dfaefd60d81b0b3eb2ed6fd9a50e4982d595c180 100644 (file)
@@ -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);
 }