summaryrefslogtreecommitdiff
path: root/src/core/load-dropin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/load-dropin.c')
-rw-r--r--src/core/load-dropin.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
index 8da4adc9a2..7a17baaf89 100644
--- a/src/core/load-dropin.c
+++ b/src/core/load-dropin.c
@@ -65,15 +65,11 @@ static int iterate_dir(
for (;;) {
struct dirent *de;
_cleanup_free_ char *f = NULL;
- int k;
errno = 0;
de = readdir(d);
- if (!de && errno != 0) {
- k = errno;
- log_error_errno(k, "Failed to read directory %s: %m", path);
- return -k;
- }
+ if (!de && errno != 0)
+ return log_error_errno(errno, "Failed to read directory %s: %m", path);
if (!de)
break;