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:
parent
0b8086379f
commit
7d7fa31c62
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user