]> git.proxmox.com Git - systemd.git/blobdiff - src/vconsole/vconsole-setup.c
New upstream version 236
[systemd.git] / src / vconsole / vconsole-setup.c
index f531aece7f4bc95f765ed26049c8b6b38e3f844f..e19a1637bf4d038c7abc03a89db6062a4f22055a 100644 (file)
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
 /***
   This file is part of systemd.
 
@@ -334,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++) {
@@ -395,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;