summaryrefslogtreecommitdiff
path: root/src/vconsole
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/vconsole
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/vconsole')
-rw-r--r--src/vconsole/vconsole-setup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index c928741a4e..e19a1637bf 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
@@ -335,7 +335,7 @@ static int find_source_vc(char **ret_path, unsigned *ret_idx) {
int ret_fd, r, err = 0;
path = new(char, sizeof("/dev/tty63"));
- if (path == NULL)
+ if (!path)
return log_oom();
for (i = 1; i <= 63; i++) {
@@ -396,7 +396,7 @@ static int verify_source_vc(char **ret_path, const char *src_vc) {
return log_error_errno(r, "Virtual console %s is not in K_XLATE or K_UNICODE: %m", src_vc);
path = strdup(src_vc);
- if (path == NULL)
+ if (!path)
return log_oom();
*ret_path = path;