From 7d7fa31c62242e11494ace491a8c98fb070d4e8a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 21 Dec 2015 19:53:41 +0100 Subject: 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. --- src/basic/bitmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/basic/bitmap.c') 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) -- cgit v1.2.3-54-g00ecf