patch-2.3.43 linux/include/asm-ppc/bitops.h

Next file: linux/include/asm-ppc/bootinfo.h
Previous file: linux/include/asm-mips/pgtable.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.42/linux/include/asm-ppc/bitops.h linux/include/asm-ppc/bitops.h
@@ -1,5 +1,5 @@
 /*
- * $Id: bitops.h,v 1.11 1999/01/03 20:16:48 cort Exp $
+ * $Id: bitops.h,v 1.12 2000/02/09 03:28:31 davem Exp $
  * bitops.h: Bit string operations on the ppc
  */
 
@@ -88,11 +88,11 @@
 }
 #endif
 
-extern __inline__ unsigned long test_bit(int nr, __const__ volatile void *addr)
+extern __inline__ int test_bit(int nr, __const__ volatile void *addr)
 {
 	__const__ unsigned int *p = (__const__ unsigned int *) addr;
 
-	return (p[nr >> 5] >> (nr & 0x1f)) & 1UL;
+	return ((p[nr >> 5] >> (nr & 0x1f)) & 1) != 0;
 }
 
 extern __inline__ int ffz(unsigned int x)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)