From d45798b798ee0e964f7439da1d66cf900b1696a8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 11 Sep 2016 11:06:30 +0200 Subject: [PATCH] fix leaking errno from save.test call to remove --- src/kernel/save.test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kernel/save.test.c b/src/kernel/save.test.c index 213543b77..95acbd4c0 100644 --- a/src/kernel/save.test.c +++ b/src/kernel/save.test.c @@ -25,9 +25,8 @@ #include #include -#include - #include +#include static void test_readwrite_data(CuTest * tc) { @@ -283,7 +282,9 @@ static void test_read_password_external(CuTest *tc) { FILE * F; test_setup(); - remove(pwfile); + if (remove(pwfile) != 0) { + errno = 0; + } f = test_create_faction(0); faction_setpassword(f, password_encode("secret", PASSWORD_DEFAULT)); CuAssertPtrNotNull(tc, f->_password);