diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 18:23:20 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 18:24:30 +0100 |
commit | 23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 (patch) | |
tree | 28e66fb86dd0cffc3a3cca3cf234cb52c3b64ad3 /src/core/load-dropin.c | |
parent | 5e03c6e3b517286bbd65b48d88f60e5b83721894 (diff) |
treewide: more log_*_errno + return simplifications
Diffstat (limited to 'src/core/load-dropin.c')
-rw-r--r-- | src/core/load-dropin.c | 8 |
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; |