]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: in dir_cleanup() take benefit that log_error_errno() returns the error...
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Jan 2018 14:31:01 +0000 (15:31 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 22 Jan 2018 14:31:24 +0000 (15:31 +0100)
src/tmpfiles/tmpfiles.c

index 66dabc74f1616b748014d35c188bee0f07d3213b..128abb835e2f8422819aa3fc48edff5d43193d52 100644 (file)
@@ -652,10 +652,8 @@ static int dir_cleanup(
 
                         log_debug("Removing directory \"%s\".", sub_path);
                         if (unlinkat(dirfd(d), dent->d_name, AT_REMOVEDIR) < 0)
-                                if (!IN_SET(errno, ENOENT, ENOTEMPTY)) {
-                                        log_error_errno(errno, "rmdir(%s): %m", sub_path);
-                                        r = -errno;
-                                }
+                                if (!IN_SET(errno, ENOENT, ENOTEMPTY))
+                                        r = log_error_errno(errno, "rmdir(%s): %m", sub_path);
 
                 } else {
                         /* Skip files for which the sticky bit is