chiark / gitweb /
Prep v233: Unmask now needed functions in src/basic
[elogind.git] / src / basic / conf-files.c
index 5854caeb518d1a2ec49b07520c73a0ebd757688d..1cd0d9dfc6967b32b544063bf9590216684a4855 100644 (file)
@@ -1,5 +1,3 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
 /***
   This file is part of systemd.
 
@@ -45,7 +43,6 @@ static int files_add(Hashmap *h, const char *root, const char *path, const char
         int r;
 
         assert(path);
-        assert(suffix);
 
         dirpath = prefix_roota(root, path);
 
@@ -62,7 +59,7 @@ static int files_add(Hashmap *h, const char *root, const char *path, const char
                 if (!dirent_is_file_with_suffix(de, suffix))
                         continue;
 
-                p = strjoin(dirpath, "/", de->d_name, NULL);
+                p = strjoin(dirpath, "/", de->d_name);
                 if (!p)
                         return -ENOMEM;
 
@@ -96,7 +93,6 @@ static int conf_files_list_strv_internal(char ***strv, const char *suffix, const
         int r;
 
         assert(strv);
-        assert(suffix);
 
         /* This alters the dirs string array */
         if (!path_strv_resolve_uniq(dirs, root))
@@ -128,7 +124,6 @@ int conf_files_list_strv(char ***strv, const char *suffix, const char *root, con
         _cleanup_strv_free_ char **copy = NULL;
 
         assert(strv);
-        assert(suffix);
 
         copy = strv_copy((char**) dirs);
         if (!copy)
@@ -137,12 +132,12 @@ int conf_files_list_strv(char ***strv, const char *suffix, const char *root, con
         return conf_files_list_strv_internal(strv, suffix, root, copy);
 }
 
+#if 0 /// UNNEEDED by elogind
 int conf_files_list(char ***strv, const char *suffix, const char *root, const char *dir, ...) {
         _cleanup_strv_free_ char **dirs = NULL;
         va_list ap;
 
         assert(strv);
-        assert(suffix);
 
         va_start(ap, dir);
         dirs = strv_new_ap(dir, ap);
@@ -153,12 +148,12 @@ int conf_files_list(char ***strv, const char *suffix, const char *root, const ch
 
         return conf_files_list_strv_internal(strv, suffix, root, dirs);
 }
+#endif // 0
 
 int conf_files_list_nulstr(char ***strv, const char *suffix, const char *root, const char *d) {
         _cleanup_strv_free_ char **dirs = NULL;
 
         assert(strv);
-        assert(suffix);
 
         dirs = strv_split_nulstr(d);
         if (!dirs)