From bcb097a16e68325398cc4880fe4bbc56279a315d Mon Sep 17 00:00:00 2001 From: Moritz Grimm Date: Mon, 25 Sep 2017 19:34:37 +0200 Subject: [PATCH] Remove more superfluous access() checks Removes TOCTOU complaints from Coverity --- tests/check_util.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/check_util.c b/tests/check_util.c index 07e5343..aa768a5 100644 --- a/tests/check_util.c +++ b/tests/check_util.c @@ -25,9 +25,7 @@ START_TEST(test_util_write_pid_file) ck_assert_int_eq(fclose(pidfile_2), 0); unlink(BUILDDIR "/check_util-write_pid_file.pid"); - ck_assert_int_ne(access(BUILDDIR "/check_util-write_pid_file.pid", F_OK), 0); ck_assert_int_eq(util_write_pid_file(BUILDDIR "/check_util-write_pid_file.pid"), 0); - ck_assert_int_eq(access(BUILDDIR "/check_util-write_pid_file.pid", F_OK), 0); ck_assert_int_eq(util_write_pid_file(BUILDDIR "/check_util-write_pid_file.pid"), 0); ck_assert_int_eq(unlink(BUILDDIR "/check_util-write_pid_file.pid"), 0); ck_assert_int_ne(access(BUILDDIR "/check_util-write_pid_file.pid", F_OK), 0);