Hans Leidekker : kernel32: GetModuleHandleEx already clears the module handle on failure.

Alexandre Julliard julliard at winehq.org
Thu Apr 5 12:31:45 CDT 2012


Module: wine
Branch: master
Commit: 31ffa5477336ca06fc24e9ef83eff396c6a718f2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=31ffa5477336ca06fc24e9ef83eff396c6a718f2

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Apr  5 11:16:37 2012 +0200

kernel32: GetModuleHandleEx already clears the module handle on failure.

---

 dlls/kernel32/module.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index d4978cf..6b91a4c 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -570,7 +570,7 @@ HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR module)
 {
     HMODULE ret;
 
-    if (!GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, module, &ret )) ret = 0;
+    GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, module, &ret );
     return ret;
 }
 
@@ -583,7 +583,7 @@ HMODULE WINAPI GetModuleHandleW(LPCWSTR module)
 {
     HMODULE ret;
 
-    if (!GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, module, &ret )) ret = 0;
+    GetModuleHandleExW( GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, module, &ret );
     return ret;
 }
 




More information about the wine-cvs mailing list