]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
path-util: make use of path_join() in path_make_absolute_cwd() 8822/head
authorFranck Bui <fbui@suse.com>
Mon, 16 Jul 2018 15:57:41 +0000 (17:57 +0200)
committerFranck Bui <fbui@suse.com>
Mon, 30 Jul 2018 14:06:02 +0000 (16:06 +0200)
src/basic/path-util.c

index d214c72916090c173e090a3ccf9cecf45cf18a94..b62786f27e6eb2515aa0a9bd609403d1e2bacf86 100644 (file)
@@ -110,10 +110,7 @@ int path_make_absolute_cwd(const char *p, char **ret) {
                 if (r < 0)
                         return r;
 
-                if (endswith(cwd, "/"))
-                        c = strjoin(cwd, p);
-                else
-                        c = strjoin(cwd, "/", p);
+                c = path_join(NULL, cwd, p);
         }
         if (!c)
                 return -ENOMEM;