]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/path-util.c
util: introduce memcmp_safe()
[thirdparty/systemd.git] / src / basic / path-util.c
index 2e68de9e63e0186170df05aca5bef4311cb0952f..b62786f27e6eb2515aa0a9bd609403d1e2bacf86 100644 (file)
@@ -1,9 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-  This file is part of systemd.
-
-  Copyright 2010-2012 Lennart Poettering
-***/
 
 #include <errno.h>
 #include <limits.h>
@@ -115,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;