chiark / gitweb /
core: don't use the unified hierarchy for the elogind cgroup yet (#4628)
[elogind.git] / src / basic / path-util.c
index cdbb2d39815f349fd4736fcb05e639126935a312..25a956e9705ac933426e9e5947e419de485246a1 100644 (file)
@@ -82,7 +82,7 @@ char *path_make_absolute(const char *p, const char *prefix) {
         if (path_is_absolute(p) || !prefix)
                 return strdup(p);
 
-        return strjoin(prefix, "/", p, NULL);
+        return strjoin(prefix, "/", p);
 }
 #endif // 0
 
@@ -104,7 +104,7 @@ int path_make_absolute_cwd(const char *p, char **ret) {
                 if (!cwd)
                         return negative_errno();
 
-                c = strjoin(cwd, "/", p, NULL);
+                c = strjoin(cwd, "/", p);
         }
         if (!c)
                 return -ENOMEM;
@@ -447,13 +447,11 @@ char* path_join(const char *root, const char *path, const char *rest) {
                 return strjoin(root, endswith(root, "/") ? "" : "/",
                                path[0] == '/' ? path+1 : path,
                                rest ? (endswith(path, "/") ? "" : "/") : NULL,
-                               rest && rest[0] == '/' ? rest+1 : rest,
-                               NULL);
+                               rest && rest[0] == '/' ? rest+1 : rest);
         else
                 return strjoin(path,
                                rest ? (endswith(path, "/") ? "" : "/") : NULL,
-                               rest && rest[0] == '/' ? rest+1 : rest,
-                               NULL);
+                               rest && rest[0] == '/' ? rest+1 : rest);
 }
 
 int find_binary(const char *name, char **ret) {
@@ -497,7 +495,7 @@ int find_binary(const char *name, char **ret) {
                 if (!path_is_absolute(element))
                         continue;
 
-                j = strjoin(element, "/", name, NULL);
+                j = strjoin(element, "/", name);
                 if (!j)
                         return -ENOMEM;
 
@@ -824,7 +822,6 @@ bool is_deviceallow_pattern(const char *path) {
                startswith(path, "block-") ||
                startswith(path, "char-");
 }
-#endif // 0
 
 int systemd_installation_has_version(const char *root, unsigned minimal_version) {
         const char *pattern;
@@ -891,3 +888,4 @@ int systemd_installation_has_version(const char *root, unsigned minimal_version)
 
         return false;
 }
+#endif // 0