mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
![Zbigniew Jędrzejewski-Szmek](/assets/img/avatar_default.png)
They are not needed, because anything that is non-zero is converted to true. C11: > 6.3.1.2: When any scalar value is converted to _Bool, the result is 0 if the > value compares equal to 0; otherwise, the result is 1. https://stackoverflow.com/questions/31551888/casting-int-to-bool-in-c-c
13 lines
98 B
Plaintext
13 lines
98 B
Plaintext
@@
|
|
bool b;
|
|
expression y;
|
|
@@
|
|
- b = !!(y);
|
|
+ b = y;
|
|
@@
|
|
bool b;
|
|
expression y;
|
|
@@
|
|
- b = !!y;
|
|
+ b = y;
|