[TOOLS] Fix set_bit/clear bit for x86/64 in xc_linux_save
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 22 Jun 2006 20:37:33 +0000 (21:37 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 22 Jun 2006 20:37:33 +0000 (21:37 +0100)
From: John Byrne <john.l.byrne@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/libxc/xc_linux_save.c

index fed95cf315322d9949ae2d35bdacaac42424035b..9e8c367def81d618518ab7a5c30434d1545d8537 100644 (file)
@@ -91,12 +91,12 @@ static inline int test_bit (int nr, volatile void * addr)
 
 static inline void clear_bit (int nr, volatile void * addr)
 {
-    BITMAP_ENTRY(nr, addr) &= ~(1 << BITMAP_SHIFT(nr));
+    BITMAP_ENTRY(nr, addr) &= ~(1UL << BITMAP_SHIFT(nr));
 }
 
 static inline void set_bit ( int nr, volatile void * addr)
 {
-    BITMAP_ENTRY(nr, addr) |= (1 << BITMAP_SHIFT(nr));
+    BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr));
 }
 
 /* Returns the hamming weight (i.e. the number of bits set) in a N-bit word */