]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
load-fragment: use path_join() where appropriate
authorLennart Poettering <lennart@poettering.net>
Tue, 20 Aug 2019 15:32:34 +0000 (17:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Aug 2019 15:32:34 +0000 (17:32 +0200)
src/core/load-fragment.c

index 20079e1fb1281caccdb823748be5d3c2622a4e6f..c7827df95d2701742053baed88b360edf1d63719 100644 (file)
@@ -98,14 +98,12 @@ int parse_confirm_spawn(const char *value, char **console) {
         if (r == 0) {
                 *console = NULL;
                 return 0;
-        }
-
-        if (r > 0) /* on with default tty */
+        } else if (r > 0) /* on with default tty */
                 s = strdup("/dev/console");
         else if (is_path(value)) /* on with fully qualified path */
                 s = strdup(value);
         else /* on with only a tty file name, not a fully qualified path */
-                s = strjoin("/dev/", value);
+                s = path_join("/dev/", value);
         if (!s)
                 return -ENOMEM;