summaryrefslogtreecommitdiff
path: root/ext2fs/bitmap.c
diff options
context:
space:
mode:
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;