From: kaf24@firebug.cl.cam.ac.uk Date: Thu, 22 Jun 2006 20:37:33 +0000 (+0100) Subject: [TOOLS] Fix set_bit/clear bit for x86/64 in xc_linux_save X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15921^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b9ad8f1e1368df4dd26001d600c6a798b1f4da8f;p=xen.git [TOOLS] Fix set_bit/clear bit for x86/64 in xc_linux_save From: John Byrne Signed-off-by: Keir Fraser --- diff --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c index fed95cf315..9e8c367def 100644 --- a/tools/libxc/xc_linux_save.c +++ b/tools/libxc/xc_linux_save.c @@ -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 */