summaryrefslogtreecommitdiff
path: root/tests/bit-test.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2007-01-05 03:31:54 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2007-01-05 03:31:54 +0000
commit46dae95f4ab46ef354fe8df3e168de9e7dc9703f (patch)
tree0e894b02393b7950f1939f1d1f556a16c6efc99d /tests/bit-test.c
parentc7006f9ec54bc5a6845ba52ba9e9d4b5be4b2653 (diff)
downloadglib-46dae95f4ab46ef354fe8df3e168de9e7dc9703f.tar.gz
Fix tests on x86_64.
2007-01-04 Behdad Esfahbod <behdad@gnome.org> * tests/bit-test.c (builtin_bit_nth_lsf1), (builtin_bit_nth_lsf2), (builtin_bit_nth_msf): Fix tests on x86_64. svn path=/trunk/; revision=5216
Diffstat (limited to 'tests/bit-test.c')
-rw-r--r--tests/bit-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/bit-test.c b/tests/bit-test.c
index 4fba905eb..230c85246 100644
--- a/tests/bit-test.c
+++ b/tests/bit-test.c
@@ -13,7 +13,7 @@ builtin_bit_nth_lsf1 (gulong mask, gint nth_bit)
if (nth_bit >= 0)
{
if (G_LIKELY (nth_bit < GLIB_SIZEOF_LONG * 8 - 1))
- mask &= -(1<<(nth_bit+1));
+ mask &= -(1UL<<(nth_bit+1));
else
mask = 0;
}
@@ -26,7 +26,7 @@ builtin_bit_nth_lsf2 (gulong mask, gint nth_bit)
if (nth_bit >= 0)
{
if (G_LIKELY (nth_bit < GLIB_SIZEOF_LONG * 8 - 1))
- mask &= -(1<<(nth_bit+1));
+ mask &= -(1UL<<(nth_bit+1));
else
mask = 0;
}
@@ -37,7 +37,7 @@ static gint
builtin_bit_nth_msf (gulong mask, gint nth_bit)
{
if (nth_bit >= 0 && nth_bit < GLIB_SIZEOF_LONG * 8)
- mask &= (1<<nth_bit)-1;
+ mask &= (1UL<<nth_bit)-1;
return mask ? GLIB_SIZEOF_LONG * 8 - 1 - __builtin_clzl(mask) : -1;
}