Commit Graph

2 Commits

Author SHA1 Message Date
Frantisek Sumsal 473de9b708 coccinelle: fix the equals-null transformation
The original issue with this transformation was that we were replacing
the whole if statement instead of just the expression inside. That
caused the code to be weirdly formatted, as Coccinelle put a new block
around each replaced if statement.

This version replaces just the inner expression if it's in its incorrect
form, otherwise it just accepts it (to avoid recursion).
2020-10-04 12:32:21 +02:00
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