From d8f5a310227e7c74548b7f6ca9aafd39af6a621f Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Fri, 10 May 2024 18:16:31 +0800 Subject: [PATCH] tmpfiles: don't compare errno with negative value Follow-up for 677430b3c7fcd1b352eb66f19b8746741459b91a --- src/tmpfiles/tmpfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 010eca02980..8d87f8306a7 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -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; -- 2.47.3