diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2015-07-16 15:12:26 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2015-07-16 15:12:26 +0200 |
commit | 2ec7c4279e4cbbe668c5dfb0ab447b74deaa294b (patch) | |
tree | 27006a5c9063902b387f609920406abac3299976 /src/test/test-bitmap.c | |
parent | 18458807574ec84f2bba4597ea5f8c925037d5f4 (diff) | |
parent | cb57dd41595adddb08095298bb1ed258c8ea4877 (diff) |
Merge pull request #602 from teg/bitmap-iterator
bitmap: use external iterator
Diffstat (limited to 'src/test/test-bitmap.c')
-rw-r--r-- | src/test/test-bitmap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/test-bitmap.c b/src/test/test-bitmap.c index 304888beb9..77db784a94 100644 --- a/src/test/test-bitmap.c +++ b/src/test/test-bitmap.c @@ -21,6 +21,7 @@ int main(int argc, const char *argv[]) { _cleanup_bitmap_free_ Bitmap *b = NULL; + Iterator it; unsigned n = (unsigned) -1, i = 0; b = bitmap_new(); @@ -61,7 +62,7 @@ int main(int argc, const char *argv[]) { assert_se(bitmap_set(b, 1) == 0); assert_se(bitmap_set(b, 256) == 0); - BITMAP_FOREACH(n, b) { + BITMAP_FOREACH(n, b, it) { assert_se(n == i); if (i == 0) i = 1; @@ -75,7 +76,7 @@ int main(int argc, const char *argv[]) { i = 0; - BITMAP_FOREACH(n, b) { + BITMAP_FOREACH(n, b, it) { assert_se(n == i); if (i == 0) i = 1; |