summaryrefslogtreecommitdiff
path: root/ext2fs/bitmap.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-05-10 19:08:53 +0000
committerMiles Bader <miles@gnu.org>1995-05-10 19:08:53 +0000
commit5e0a1aa551c18349d14bb8169d73f71fbf32b1af (patch)
treea17df890e1665ab52411765cae8a2b8f566b64e0 /ext2fs/bitmap.c
parent92c2b643e2b253939dc98f3d0b4fcdffef60377a (diff)
(find_next_zero_bit): Fix stupid typos (present in the original linux source
I copied this function from!) which were causing occasional garbage results.
Diffstat (limited to 'ext2fs/bitmap.c')
-rw-r--r--ext2fs/bitmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext2fs/bitmap.c b/ext2fs/bitmap.c
index e176afe7..a983cab9 100644
--- a/ext2fs/bitmap.c
+++ b/ext2fs/bitmap.c
@@ -81,7 +81,7 @@ inline unsigned long ffz(unsigned long word)
inline unsigned long
find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
{
- unsigned long *p = ((unsigned long *) addr) + (offset >> 6);
+ unsigned long *p = ((unsigned long *) addr) + (offset >> 5);
unsigned long result = offset & ~31UL;
unsigned long tmp;
@@ -100,7 +100,7 @@ find_next_zero_bit(void *addr, unsigned long size, unsigned long offset)
size -= 32;
result += 32;
}
- while (size & ~32UL)
+ while (size & ~31UL)
{
if (~(tmp = *(p++)))
goto found_middle;