Dmitry Timoshkov : wmiutils: Remove unused IUnknown *outer parameter from object constructors.

Alexandre Julliard julliard at winehq.org
Tue Jan 7 13:21:18 CST 2014


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Dec 30 18:21:40 2013 +0900

wmiutils: Remove unused IUnknown *outer parameter from object constructors.

---

 dlls/wmiutils/main.c             |    7 ++-----
 dlls/wmiutils/path.c             |   10 +++++-----
 dlls/wmiutils/statuscode.c       |    4 ++--
 dlls/wmiutils/wmiutils_private.h |    4 ++--
 4 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/dlls/wmiutils/main.c b/dlls/wmiutils/main.c
index c088a68..89fd26b 100644
--- a/dlls/wmiutils/main.c
+++ b/dlls/wmiutils/main.c
@@ -37,7 +37,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wmiutils);
 
 static HINSTANCE instance;
 
-typedef HRESULT (*fnCreateInstance)( IUnknown *pUnkOuter, LPVOID *ppObj );
+typedef HRESULT (*fnCreateInstance)( LPVOID *ppObj );
 
 typedef struct
 {
@@ -87,14 +87,11 @@ static HRESULT WINAPI wmiutils_cf_CreateInstance( IClassFactory *iface, LPUNKNOW
     if (pOuter)
         return CLASS_E_NOAGGREGATION;
 
-    r = This->pfnCreateInstance( pOuter, (LPVOID *)&punk );
+    r = This->pfnCreateInstance( (LPVOID *)&punk );
     if (FAILED(r))
         return r;
 
     r = IUnknown_QueryInterface( punk, riid, ppobj );
-    if (FAILED(r))
-        return r;
-
     IUnknown_Release( punk );
     return r;
 }
diff --git a/dlls/wmiutils/path.c b/dlls/wmiutils/path.c
index 046f424..647724f 100644
--- a/dlls/wmiutils/path.c
+++ b/dlls/wmiutils/path.c
@@ -276,11 +276,11 @@ static const struct IWbemPathKeyListVtbl keylist_vtbl =
     keylist_GetText
 };
 
-static HRESULT WbemPathKeyList_create( IUnknown *pUnkOuter, IWbemPath *parent, LPVOID *ppObj )
+static HRESULT WbemPathKeyList_create( IWbemPath *parent, LPVOID *ppObj )
 {
     struct keylist *keylist;
 
-    TRACE("%p, %p\n", pUnkOuter, ppObj);
+    TRACE("%p\n", ppObj);
 
     if (!(keylist = heap_alloc( sizeof(*keylist) ))) return E_OUTOFMEMORY;
 
@@ -1178,7 +1178,7 @@ static HRESULT WINAPI path_GetKeyList(
         LeaveCriticalSection( &path->cs );
         return WBEM_E_INVALID_PARAMETER;
     }
-    hr = WbemPathKeyList_create( NULL, iface, (void **)pOut );
+    hr = WbemPathKeyList_create( iface, (void **)pOut );
 
     LeaveCriticalSection( &path->cs );
     return hr;
@@ -1269,11 +1269,11 @@ static const struct IWbemPathVtbl path_vtbl =
     path_IsSameClassName
 };
 
-HRESULT WbemPath_create( IUnknown *pUnkOuter, LPVOID *ppObj )
+HRESULT WbemPath_create( LPVOID *ppObj )
 {
     struct path *path;
 
-    TRACE("%p, %p\n", pUnkOuter, ppObj);
+    TRACE("%p\n", ppObj);
 
     if (!(path = heap_alloc( sizeof(*path) ))) return E_OUTOFMEMORY;
 
diff --git a/dlls/wmiutils/statuscode.c b/dlls/wmiutils/statuscode.c
index 0718c17..719f3af 100644
--- a/dlls/wmiutils/statuscode.c
+++ b/dlls/wmiutils/statuscode.c
@@ -132,11 +132,11 @@ static const struct IWbemStatusCodeTextVtbl status_code_vtbl =
     status_code_GetFacilityCodeText
 };
 
-HRESULT WbemStatusCodeText_create( IUnknown *pUnkOuter, LPVOID *ppObj )
+HRESULT WbemStatusCodeText_create( LPVOID *ppObj )
 {
     status_code *sc;
 
-    TRACE("(%p,%p)\n", pUnkOuter, ppObj);
+    TRACE("(%p)\n", ppObj);
 
     if (!(sc = heap_alloc( sizeof(*sc) ))) return E_OUTOFMEMORY;
 
diff --git a/dlls/wmiutils/wmiutils_private.h b/dlls/wmiutils/wmiutils_private.h
index fbd6ab5..2b76f71 100644
--- a/dlls/wmiutils/wmiutils_private.h
+++ b/dlls/wmiutils/wmiutils_private.h
@@ -18,8 +18,8 @@
 
 #include "wine/unicode.h"
 
-HRESULT WbemPath_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
-HRESULT WbemStatusCodeText_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN;
+HRESULT WbemPath_create(LPVOID *) DECLSPEC_HIDDEN;
+HRESULT WbemStatusCodeText_create(LPVOID *) DECLSPEC_HIDDEN;
 
 static void *heap_alloc( size_t len ) __WINE_ALLOC_SIZE(1);
 static inline void *heap_alloc( size_t len )




More information about the wine-cvs mailing list