diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-04-27 18:20:17 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-07 18:17:36 +0200 |
commit | a826d4f7d01b144df191cf7a6de729b678cdb1d9 (patch) | |
tree | 72fe39057eaa7799bd8d25b82a66410606af8e09 /src/sysctl/sysctl.c | |
parent | 971f6ea5511a204165a7bc2f8da92f5a465dad57 (diff) | |
download | systemd-a826d4f7d01b144df191cf7a6de729b678cdb1d9.tar.gz |
Eliminate config_dirs vars which hold a static strv
Diffstat (limited to 'src/sysctl/sysctl.c')
-rw-r--r-- | src/sysctl/sysctl.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 55aedffc6e..5489cb96b7 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -29,8 +29,6 @@ static char **arg_prefixes = NULL; static bool arg_cat_config = false; -static char **config_dirs = CONF_PATHS_STRV("sysctl.d"); - static int apply_all(OrderedHashmap *sysctl_options) { char *property, *value; Iterator i; @@ -85,7 +83,7 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign assert(path); - r = search_and_fopen(path, "re", NULL, (const char**) config_dirs, &f); + r = search_and_fopen(path, "re", NULL, (const char**) CONF_PATHS_STRV("sysctl.d"), &f); if (r < 0) { if (ignore_enoent && r == -ENOENT) return 0; @@ -282,7 +280,7 @@ int main(int argc, char *argv[]) { _cleanup_strv_free_ char **files = NULL; char **f; - r = conf_files_list_strv(&files, ".conf", NULL, 0, (const char**) config_dirs); + r = conf_files_list_strv(&files, ".conf", NULL, 0, (const char**) CONF_PATHS_STRV("sysctl.d")); if (r < 0) { log_error_errno(r, "Failed to enumerate sysctl.d files: %m"); goto finish; |