summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <github@zonque.org>2015-07-23 08:49:14 +0200
committerDaniel Mack <github@zonque.org>2015-07-23 08:49:14 +0200
commit2d3102cc401ff743e23be5202cfbaa52dcad8e4d (patch)
treed6d3b84b62d975a7afeca8e0de977f70a2d29dd9
parentf7d51e1c19aaf26e7b23661d43e71c9e6fcf7adf (diff)
parent05fb03beeecd730e5525253b9c3c8706e1834b09 (diff)
Merge pull request #672 from poettering/bitmap-isclear
bitmap: bitmap_clear()
-rw-r--r--src/basic/bitmap.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/basic/bitmap.c b/src/basic/bitmap.c
index 0747749d13..7e47c2d09f 100644
--- a/src/basic/bitmap.c
+++ b/src/basic/bitmap.c
@@ -140,12 +140,9 @@ bool bitmap_isclear(Bitmap *b) {
}
void bitmap_clear(Bitmap *b) {
- unsigned i;
-
assert(b);
- for (i = 0; i < b->n_bitmaps; i++)
- b->bitmaps[i] = 0;
+ b->n_bitmaps = 0;
}
bool bitmap_iterate(Bitmap *b, Iterator *i, unsigned *n) {