]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: don't compare errno with negative value
authorMike Yuan <me@yhndnzj.com>
Fri, 10 May 2024 10:16:31 +0000 (18:16 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 10 May 2024 10:50:05 +0000 (18:50 +0800)
Follow-up for 677430b3c7fcd1b352eb66f19b8746741459b91a

src/tmpfiles/tmpfiles.c

index 010eca029807dd4c5f59ad37c297aeb58d13364b..8d87f8306a7466db06a65c4a8ccd9336a1c13ef5 100644 (file)
@@ -2547,7 +2547,7 @@ static int item_do(
 
                         de_fd = openat(fd, de->d_name, O_NOFOLLOW|O_CLOEXEC|O_PATH);
                         if (de_fd < 0) {
-                                if (errno != -ENOENT)
+                                if (errno != ENOENT)
                                         q = log_error_errno(errno, "Failed to open file '%s': %m", de->d_name);
                         } else {
                                 _cleanup_free_ char *de_path = NULL;