Huw Davies : oleaut32: Return early if there is no matching funcdesc.

Alexandre Julliard julliard at winehq.org
Thu Jun 11 15:26:45 CDT 2020


Module: wine
Branch: master
Commit: e9eb274db28e23db38b609e6719f1ee81b3b276e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e9eb274db28e23db38b609e6719f1ee81b3b276e

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Jun 11 09:03:06 2020 +0100

oleaut32: Return early if there is no matching funcdesc.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/typelib.c | 40 ++++++++++++++++++----------------------
 1 file changed, 18 insertions(+), 22 deletions(-)

diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index f8d7136834..ab421fec90 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -7805,28 +7805,24 @@ static HRESULT WINAPI ITypeInfo_fnGetDllEntry( ITypeInfo2 *iface, MEMBERID memid
         return TYPE_E_BADMODULEKIND;
 
     pFDesc = TLB_get_funcdesc_by_memberid(This, memid);
-    if(pFDesc){
-	    dump_TypeInfo(This);
-	    if (TRACE_ON(ole))
-		dump_TLBFuncDescOne(pFDesc);
-
-	    if (pBstrDllName)
-		*pBstrDllName = SysAllocString(TLB_get_bstr(This->DllName));
-
-            if (!IS_INTRESOURCE(pFDesc->Entry) && (pFDesc->Entry != (void*)-1)) {
-		if (pBstrName)
-		    *pBstrName = SysAllocString(TLB_get_bstr(pFDesc->Entry));
-		if (pwOrdinal)
-		    *pwOrdinal = -1;
-		return S_OK;
-	    }
-	    if (pBstrName)
-		*pBstrName = NULL;
-	    if (pwOrdinal)
-		*pwOrdinal = LOWORD(pFDesc->Entry);
-	    return S_OK;
-        }
-    return TYPE_E_ELEMENTNOTFOUND;
+    if (!pFDesc) return TYPE_E_ELEMENTNOTFOUND;
+
+    dump_TypeInfo(This);
+    if (TRACE_ON(ole)) dump_TLBFuncDescOne(pFDesc);
+
+    if (pBstrDllName) *pBstrDllName = SysAllocString(TLB_get_bstr(This->DllName));
+
+    if (!IS_INTRESOURCE(pFDesc->Entry) && (pFDesc->Entry != (void*)-1))
+    {
+        if (pBstrName) *pBstrName = SysAllocString(TLB_get_bstr(pFDesc->Entry));
+        if (pwOrdinal) *pwOrdinal = -1;
+    }
+    else
+    {
+        if (pBstrName) *pBstrName = NULL;
+        if (pwOrdinal) *pwOrdinal = LOWORD(pFDesc->Entry);
+    }
+    return S_OK;
 }
 
 /* internal function to make the inherited interfaces' methods appear




More information about the wine-cvs mailing list