[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix xfs_lowbit64




ffs(0) returns -1, not 0.

-Andi

--- linux-2.6.0test3/fs/xfs/xfs_bit.c-o	2003-05-27 03:00:41.000000000 +0200
+++ linux-2.6.0test3/fs/xfs/xfs_bit.c	2003-08-22 21:54:53.000000000 +0200
@@ -156,7 +156,7 @@
 {
 	int n;
 	n = ffs((unsigned)v);
-	if (n == 0) {
+	if (n < 0) {
 		n = ffs(v >> 32);
 		if (n >= 0)
 			n+=32;