1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-04 17:47:03 +03:00

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.
This commit is contained in:
Lennart Poettering 2015-12-21 19:53:41 +01:00
parent 0b8086379f
commit 7d7fa31c62

View File

@ -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)