From 4f19f5bfe7795dfbc0623ee1e904c45416d77360 Mon Sep 17 00:00:00 2001 From: TapTap Date: Sun, 6 Sep 2026 23:33:21 +0200 Subject: [PATCH] fix: satisfy cppcheck on the hard-bound walker test Drop the derived 'created = rootfd >= 0' that cppcheck flagged as always true after the EXPECT_TRUE guard. --- tests/test_shared_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_shared_utils.c b/tests/test_shared_utils.c index b4fd5df..9828620 100644 --- a/tests/test_shared_utils.c +++ b/tests/test_shared_utils.c @@ -218,7 +218,7 @@ static void test_walker_hard_bound_all_or_nothing() { EXPECT_NOT_NULL(root); int rootfd = open(root, O_RDONLY | O_DIRECTORY | O_CLOEXEC); EXPECT_TRUE(rootfd >= 0); - bool created = rootfd >= 0; + bool created = true; for (int i = 0; created && i < HARD_BOUND + 1; i++) { char name[32]; snprintf(name, sizeof(name), "f%d", i);