diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-12-21 19:53:41 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-12-26 19:09:10 +0100 |
commit | 7d7fa31c62242e11494ace491a8c98fb070d4e8a (patch) | |
tree | fd4fd684a4c4985484f2b60b25c62b1f093c6855 /src/basic/bitmap.c | |
parent | 0b8086379f0a062582c20471d6cd2646a6d22e93 (diff) |
bitmap: don't do bitwise XOR on booleans
It's weird doing bitwise operations on booleans. Let's use the boolean
XOR (i.e. "!=") instead of the bitweise XOR (i.e. "^") on them.
Diffstat (limited to 'src/basic/bitmap.c')
-rw-r--r-- | src/basic/bitmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/bitmap.c b/src/basic/bitmap.c index c8b2427b1c..50078822a7 100644 --- a/src/basic/bitmap.c +++ b/src/basic/bitmap.c @@ -200,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) |