Use "return log_error_errno" in more places"

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-07-22 21:25:09 -04:00
parent 31b14fdb6f
commit d710aaf7a5
9 changed files with 26 additions and 42 deletions
+2 -3
View File
@@ -1575,13 +1575,12 @@ static int clean_item_instance(Item *i, const char* instance) {
d = opendir_nomod(instance);
if (!d) {
if (errno == ENOENT || errno == ENOTDIR) {
if (IN_SET(errno, ENOENT, ENOTDIR)) {
log_debug_errno(errno, "Directory \"%s\": %m", instance);
return 0;
}
log_error_errno(errno, "Failed to open directory %s: %m", instance);
return -errno;
return log_error_errno(errno, "Failed to open directory %s: %m", instance);
}
if (fstat(dirfd(d), &s) < 0)