diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-17 12:18:13 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-07-17 12:18:13 +0200 |
commit | 22cedfe15fda59106b890ae2c646de96aa18a5eb (patch) | |
tree | 8cb67d72d6d42dd1d9289464df16e9f11db4b38c /src/basic | |
parent | 281033284352ed7651e84d228dad780dc2ef299f (diff) |
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).
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/bitmap.c b/src/basic/bitmap.c index d559be1bbb..83448ca93c 100644 --- a/src/basic/bitmap.c +++ b/src/basic/bitmap.c @@ -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); |