mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 00:47:10 +09:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user