summaryrefslogtreecommitdiff
path: root/src/basic/device-nodes.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-08 20:52:38 +0100
committerLennart Poettering <lennart@poettering.net>2017-12-11 16:05:40 +0100
commit234519ae6d6821ae5e83bcddb211905ef4de5700 (patch)
tree5335ad6ea093f0829bb871c2cbf83b354e53d402 /src/basic/device-nodes.c
parent4a0e9289bf443fec9fc56af25f90e2a100ba7a41 (diff)
downloadsystemd-234519ae6d6821ae5e83bcddb211905ef4de5700.tar.gz
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/device-nodes.c')
-rw-r--r--src/basic/device-nodes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/device-nodes.c b/src/basic/device-nodes.c
index 92e1f7f0bd..61dc49238c 100644
--- a/src/basic/device-nodes.c
+++ b/src/basic/device-nodes.c
@@ -40,7 +40,7 @@ int whitelisted_char_for_devnode(char c, const char *white) {
int encode_devnode_name(const char *str, char *str_enc, size_t len) {
size_t i, j;
- if (str == NULL || str_enc == NULL)
+ if (!str || !str_enc)
return -EINVAL;
for (i = 0, j = 0; str[i] != '\0'; i++) {