Do not incorrectly add the low 5 bits of the offset to the resulting
position of the found zero bit. Submitted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 2 weeks
This commit is contained in:
parent
63a07fdbc0
commit
178e776169
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=186740
@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz, size_t ofs)
|
||||
mask = ~0U << (ofs & 31);
|
||||
bit = *p | ~mask;
|
||||
if (bit != ~0U)
|
||||
return (ffs(~bit) + ofs - 1);
|
||||
return (ffs(~bit) + (ofs & ~31U) - 1);
|
||||
p++;
|
||||
ofs = (ofs + 31U) & ~31U;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user