summaryrefslogtreecommitdiff
path: root/src/modules-load
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules-load')
-rw-r--r--src/modules-load/modules-load.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 1a32d26b2d..c3aa409446 100644
--- a/src/modules-load/modules-load.c
+++ b/src/modules-load/modules-load.c
@@ -286,9 +286,11 @@ int main(int argc, char *argv[]) {
r = k;
}
- r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
- if (r < 0) {
- log_error("Failed to enumerate modules-load.d files: %s", strerror(-r));
+ k = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
+ if (k < 0) {
+ log_error("Failed to enumerate modules-load.d files: %s", strerror(-k));
+ if (r == 0)
+ r = k;
goto finish;
}