diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-08 20:52:38 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-12-08 20:52:38 +0100 |
commit | b3826e3b2bd8b5b8eb5365ff084fdc701932f9da (patch) | |
tree | 800a99745bc6b70af31e70475a78c05c38415a6d /src/basic/fileio.c | |
parent | 2f0634c5b8b3c1dc31a6860a1fbf7b8955dab6e8 (diff) |
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)
Diffstat (limited to 'src/basic/fileio.c')
-rw-r--r-- | src/basic/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 53ada062f..3c2f9742e 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -139,7 +139,7 @@ int write_string_file_ts( return r; } else - assert(ts == NULL); + assert(!ts); if (flags & WRITE_STRING_FILE_CREATE) { f = fopen(fn, "we"); @@ -1196,7 +1196,7 @@ int tempfn_xxxxxx(const char *p, const char *extra, char **ret) { if (!filename_is_valid(fn)) return -EINVAL; - if (extra == NULL) + if (!extra) extra = ""; t = new(char, strlen(p) + 2 + strlen(extra) + 6 + 1); |