From: Franck Bui Date: Mon, 16 Jul 2018 15:57:41 +0000 (+0200) Subject: path-util: make use of path_join() in path_make_absolute_cwd() X-Git-Tag: v240~864^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8822%2Fhead;p=thirdparty%2Fsystemd.git path-util: make use of path_join() in path_make_absolute_cwd() --- diff --git a/src/basic/path-util.c b/src/basic/path-util.c index d214c729160..b62786f27e6 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -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;