systemd/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