bitmap: allow bitmap_iterate() on NULL bitmap

Make sure we properly treat NULL bitmaps as empty. Right now, we don't
(which really looks like a typo).
This commit is contained in:
David Herrmann
2015-07-17 12:18:13 +02:00
parent 2810332843
commit 22cedfe15f

View File

@@ -152,7 +152,7 @@ bool bitmap_iterate(Bitmap *b, Iterator *i, unsigned *n) {
long long bitmask;
unsigned offset, rem;
if (!b && i->idx == BITMAP_END)
if (!b || i->idx == BITMAP_END)
return false;
offset = BITMAP_NUM_TO_OFFSET(i->idx);