[patch 3 of 7]: 0003-findclose-just-sets-EINVAL.-No-doserrno-is-set.txt

Kai Tietz ktietz70 at googlemail.com
Thu Dec 29 10:00:54 CST 2011


Hi,

the third patch fixes a small nit about findclose function.  On
failure, just errno gets set, but doserrno isn't clobbered.

Regards,
Kai
-------------- next part --------------
From 4864db34aee12702f9e4d7add09fbb93a875b5be Mon Sep 17 00:00:00 2001
From: Kai Tietz <ktietz70 at googlemail.com>
Date: Thu, 29 Dec 2011 15:04:28 +0100
Subject: findclose just sets EINVAL.  No doserrno is set.

---
 dlls/msvcrt/dir.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/msvcrt/dir.c b/dlls/msvcrt/dir.c
index a65a401..e8e433b 100644
--- a/dlls/msvcrt/dir.c
+++ b/dlls/msvcrt/dir.c
@@ -384,7 +384,7 @@ int CDECL MSVCRT__findclose(MSVCRT_intptr_t hand)
   TRACE(":handle %ld\n",hand);
   if (!FindClose((HANDLE)hand))
   {
-    msvcrt_set_errno(GetLastError());
+    *MSVCRT__errno () = MSVCRT_EINVAL;
     return -1;
   }
   return 0;
-- 
1.7.5.1


More information about the wine-patches mailing list