patch-1.3.87 linux/include/asm-i386/bitops.h

Next file: linux/include/asm-i386/locks.h
Previous file: linux/include/asm-alpha/stat.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.86/linux/include/asm-i386/bitops.h linux/include/asm-i386/bitops.h
@@ -66,7 +66,7 @@
  */
 extern __inline__ int test_bit(int nr, const SMPVOL void * addr)
 {
-	return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
+	return ((1UL << (nr & 31)) & (((const unsigned int *) addr)[nr >> 5])) != 0;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this