chiark / gitweb /
tree-wide: remove Lennart's copyright lines
[elogind.git] / src / basic / unit-name.c
index 02cb86390c988dff584c8c2a77925199abf3fcf1..bd0e3f428175f22849032249eb73c96aeef5b44b 100644 (file)
@@ -1,9 +1,4 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
-/***
-  This file is part of systemd.
-
-  Copyright 2010 Lennart Poettering
-***/
 
 #include <errno.h>
 #include <stddef.h>
@@ -388,9 +383,9 @@ int unit_name_path_escape(const char *f, char **ret) {
         if (!p)
                 return -ENOMEM;
 
-        path_kill_slashes(p);
+        path_simplify(p, false);
 
-        if (STR_IN_SET(p, "/", ""))
+        if (empty_or_root(p))
                 s = strdup("-");
         else {
                 if (!path_is_normalized(p))
@@ -716,7 +711,7 @@ int slice_build_parent_slice(const char *slice, char **ret) {
 }
 #endif // 0
 
-int slice_build_subslice(const char *slice, const char*name, char **ret) {
+int slice_build_subslice(const char *slice, const char *name, char **ret) {
         char *subslice;
 
         assert(slice);