From a313c9b7f931363ed603f2dee4e58e6f8b57fb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Tue, 3 May 2016 19:03:14 +0200 Subject: [PATCH] msvcrt/tests: Don't test function directly when reporting errno. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: André Hentschel Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcrt/tests/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 42ec34b0b5d..9e2beee27e0 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -2349,7 +2349,8 @@ static void test_close(void) (HANDLE)_get_osfhandle(fd1), h); ok((HANDLE)_get_osfhandle(fd2) == h, "handles mismatch (%p != %p)\n", (HANDLE)_get_osfhandle(fd2), h); - ok(!close(fd1), "close(fd1) failed (%d)\n", errno); + ret1 = close(fd1); + ok(!ret1, "close(fd1) failed (%d)\n", errno); ok(!GetHandleInformation(h, &flags), "GetHandleInformation succeeded\n"); ok(close(fd2), "close(fd2) succeeded\n");