summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-17 12:18:13 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2015-07-17 12:18:13 +0200
commit22cedfe15fda59106b890ae2c646de96aa18a5eb (patch)
tree8cb67d72d6d42dd1d9289464df16e9f11db4b38c /src/basic
parent281033284352ed7651e84d228dad780dc2ef299f (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.c2
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);