diff options
author | Tom Gundersen <teg@jklm.no> | 2015-12-27 21:19:28 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-12-27 21:19:28 +0100 |
commit | f791b677a8798fdfe08e706dccbfa7a5c8e49433 (patch) | |
tree | 5730e77ab0ff5a9da4502fb3104ed46493da378f /src/basic | |
parent | 326092991934fe3a02921d1e1278073a5b677dcc (diff) | |
parent | f4461e5641d53f27d6e76e0607bdaa9c0c58c1f6 (diff) |
Merge pull request #2225 from poettering/dnssec7
Seventh DNSSEC patchset
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/bitmap.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/basic/bitmap.c b/src/basic/bitmap.c index 95f59e400a..50078822a7 100644 --- a/src/basic/bitmap.c +++ b/src/basic/bitmap.c @@ -140,7 +140,8 @@ bool bitmap_isset(Bitmap *b, unsigned n) { bool bitmap_isclear(Bitmap *b) { unsigned i; - assert(b); + if (!b) + return true; for (i = 0; i < b->n_bitmaps; i++) if (b->bitmaps[i] != 0) @@ -150,7 +151,9 @@ bool bitmap_isclear(Bitmap *b) { } void bitmap_clear(Bitmap *b) { - assert(b); + + if (!b) + return; b->bitmaps = mfree(b->bitmaps); b->n_bitmaps = 0; @@ -197,7 +200,10 @@ bool bitmap_equal(Bitmap *a, Bitmap *b) { Bitmap *c; unsigned i; - if (!a ^ !b) + if (a == b) + return true; + + if (!a != !b) return false; if (!a) |