Michael Stefaniuc : sxs: Don't assign a COM object to the 3rd param of QueryInterface.

Alexandre Julliard julliard at winehq.org
Thu Sep 16 15:34:31 CDT 2021


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

Author: Michael Stefaniuc <mstefani at winehq.org>
Date:   Wed Sep 15 20:31:47 2021 +0200

sxs: Don't assign a COM object to the 3rd param of QueryInterface.

Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/sxs/cache.c | 10 ++++------
 dlls/sxs/name.c  | 10 ++++------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/dlls/sxs/cache.c b/dlls/sxs/cache.c
index 0acf012032d..e4fdda8c860 100644
--- a/dlls/sxs/cache.c
+++ b/dlls/sxs/cache.c
@@ -57,19 +57,17 @@ static inline struct cache *impl_from_IAssemblyCache(IAssemblyCache *iface)
 static HRESULT WINAPI cache_QueryInterface(
     IAssemblyCache *iface,
     REFIID riid,
-    void **obj )
+    void **ret_iface )
 {
-    struct cache *cache = impl_from_IAssemblyCache(iface);
-
-    TRACE("%p, %s, %p\n", cache, debugstr_guid(riid), obj);
+    TRACE("%p, %s, %p\n", iface, debugstr_guid(riid), ret_iface);
 
-    *obj = NULL;
+    *ret_iface = NULL;
 
     if (IsEqualIID(riid, &IID_IUnknown) ||
         IsEqualIID(riid, &IID_IAssemblyCache))
     {
         IAssemblyCache_AddRef( iface );
-        *obj = cache;
+        *ret_iface = iface;
         return S_OK;
     }
 
diff --git a/dlls/sxs/name.c b/dlls/sxs/name.c
index 6b3ae5197ac..0fab45c5018 100644
--- a/dlls/sxs/name.c
+++ b/dlls/sxs/name.c
@@ -56,19 +56,17 @@ static inline struct name *impl_from_IAssemblyName( IAssemblyName *iface )
 static HRESULT WINAPI name_QueryInterface(
     IAssemblyName *iface,
     REFIID riid,
-    void **obj )
+    void **ret_iface )
 {
-    struct name *name = impl_from_IAssemblyName( iface );
-
-    TRACE("%p, %s, %p\n", name, debugstr_guid(riid), obj);
+    TRACE("%p, %s, %p\n", iface, debugstr_guid(riid), ret_iface);
 
-    *obj = NULL;
+    *ret_iface = NULL;
 
     if (IsEqualIID( riid, &IID_IUnknown ) ||
         IsEqualIID( riid, &IID_IAssemblyName ))
     {
         IAssemblyName_AddRef( iface );
-        *obj = name;
+        *ret_iface = iface;
         return S_OK;
     }
 




More information about the wine-cvs mailing list