1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
systemd-stable/coccinelle/equals-null.cocci
Lennart Poettering 234519ae6d tree-wide: drop a few == NULL and != NULL comparison
Our CODING_STYLE suggests not comparing with NULL, but relying on C's
downgrade-to-bool feature for that. Fix up some code to match these
guidelines. (This is not comprehensive, the coccinelle output for this
is unfortunately kinda borked)
2017-12-11 16:05:40 +01:00

15 lines
123 B
Plaintext

@@
expression e;
statement s;
@@
- if (e == NULL)
+ if (!e)
s
@@
expression e;
statement s;
@@
- if (e != NULL)
+ if (e)
s