chiark / gitweb /
core: don't use the unified hierarchy for the elogind cgroup yet (#4628)
[elogind.git] / src / basic / fileio.c
index 55dda26a6c0c93b4e792e4c8d8160f8110b2251a..f4915b28a7092f91d2c3d7ae5f8c2582738b5cf6 100644 (file)
@@ -676,7 +676,7 @@ static int load_env_file_push(
                 return -EINVAL;
         }
 
-        p = strjoin(key, "=", strempty(value), NULL);
+        p = strjoin(key, "=", strempty(value));
         if (!p)
                 return -ENOMEM;
 
@@ -767,34 +767,6 @@ int load_env_file_pairs(FILE *f, const char *fname, const char *newline, char **
         return 0;
 }
 
-static int merge_env_file_push(
-                const char *filename, unsigned line,
-                const char *key, char *value,
-                void *userdata,
-                int *n_pushed) {
-
-        char ***env = userdata;
-        char *expanded_value;
-
-        assert(env);
-
-        expanded_value = replace_env(value, *env, REPLACE_ENV_USE_ENVIRONMENT);
-        if (!expanded_value)
-                return -ENOMEM;
-
-        free_and_replace(value, expanded_value);
-
-        return load_env_file_push(filename, line, key, value, env, n_pushed);
-}
-
-int merge_env_file(
-                char ***env,
-                FILE *f,
-                const char *fname) {
-
-        return parse_env_file_internal(f, fname, NEWLINE, merge_env_file_push, env, NULL);
-}
-
 static void write_env_var(FILE *f, const char *v) {
         const char *p;
 
@@ -993,9 +965,9 @@ static int search_and_fopen_internal(const char *path, const char *mode, const c
                 FILE *f;
 
                 if (root)
-                        p = strjoin(root, *i, "/", path, NULL);
+                        p = strjoin(root, *i, "/", path);
                 else
-                        p = strjoin(*i, "/", path, NULL);
+                        p = strjoin(*i, "/", path);
                 if (!p)
                         return -ENOMEM;