summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-08 14:50:56 +0100
committerGitHub <noreply@github.com>2017-02-08 14:50:56 +0100
commitb6f08ecda90b5ccb6c9c09e5976a627f5918dc0b (patch)
tree27616a7d5adad15e007d3f01d291b20b76d75983 /src/basic
parenta48dd3475bb0d5f3a88922cdce09ee8c63b6c0b8 (diff)
parentfbc42f133232fb92140a8039b2d643f6f0b63889 (diff)
Merge pull request #5231 from keszybz/mask-wants
Mask individual .wants/.requires symlinks
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/conf-files.c3
-rw-r--r--src/basic/dirent-util.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/conf-files.c b/src/basic/conf-files.c
index c0c22610d7..b5780194df 100644
--- a/src/basic/conf-files.c
+++ b/src/basic/conf-files.c
@@ -43,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);
@@ -94,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))
@@ -126,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)
diff --git a/src/basic/dirent-util.c b/src/basic/dirent-util.c
index 59067121b7..6b9d26773e 100644
--- a/src/basic/dirent-util.c
+++ b/src/basic/dirent-util.c
@@ -70,5 +70,8 @@ bool dirent_is_file_with_suffix(const struct dirent *de, const char *suffix) {
if (de->d_name[0] == '.')
return false;
+ if (!suffix)
+ return true;
+
return endswith(de->d_name, suffix);
}