basic/conf-files: extend conf_files_list() to list unsuffixed files

5dd11ab5f3 did a similar change for conf_files_list_strv().
Here we do the same for conf_files_list() and conf_files_list_nulstr().

No change for existing users. Tests are added.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-02-11 18:21:06 -05:00
parent cf55fc1807
commit 4e281f68ea
2 changed files with 22 additions and 4 deletions
-2
View File
@@ -137,7 +137,6 @@ int conf_files_list(char ***strv, const char *suffix, const char *root, const ch
va_list ap;
assert(strv);
assert(suffix);
va_start(ap, dir);
dirs = strv_new_ap(dir, ap);
@@ -153,7 +152,6 @@ int conf_files_list_nulstr(char ***strv, const char *suffix, const char *root, c
_cleanup_strv_free_ char **dirs = NULL;
assert(strv);
assert(suffix);
dirs = strv_split_nulstr(d);
if (!dirs)