Michael Stefaniuc : msxml3: Don't cast from a COM object to an iface.

Alexandre Julliard julliard at winehq.org
Mon Jul 4 09:54:40 CDT 2016


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Jun 29 09:52:29 2016 +0200

msxml3: Don't cast from a COM object to an iface.

Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msxml3/httprequest.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index e0f08ea..e0b6e1c 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -1560,19 +1560,19 @@ static HRESULT WINAPI
 httprequest_ObjectWithSite_QueryInterface( IObjectWithSite* iface, REFIID riid, void** ppvObject )
 {
     httprequest *This = impl_from_IObjectWithSite(iface);
-    return IXMLHTTPRequest_QueryInterface( (IXMLHTTPRequest *)This, riid, ppvObject );
+    return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppvObject);
 }
 
 static ULONG WINAPI httprequest_ObjectWithSite_AddRef( IObjectWithSite* iface )
 {
     httprequest *This = impl_from_IObjectWithSite(iface);
-    return IXMLHTTPRequest_AddRef((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
 }
 
 static ULONG WINAPI httprequest_ObjectWithSite_Release( IObjectWithSite* iface )
 {
     httprequest *This = impl_from_IObjectWithSite(iface);
-    return IXMLHTTPRequest_Release((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
 }
 
 static HRESULT WINAPI httprequest_ObjectWithSite_GetSite( IObjectWithSite *iface, REFIID iid, void **ppvSite )
@@ -1656,19 +1656,19 @@ static const IObjectWithSiteVtbl ObjectWithSiteVtbl =
 static HRESULT WINAPI httprequest_Safety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
 {
     httprequest *This = impl_from_IObjectSafety(iface);
-    return IXMLHTTPRequest_QueryInterface( (IXMLHTTPRequest *)This, riid, ppv );
+    return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppv);
 }
 
 static ULONG WINAPI httprequest_Safety_AddRef(IObjectSafety *iface)
 {
     httprequest *This = impl_from_IObjectSafety(iface);
-    return IXMLHTTPRequest_AddRef((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
 }
 
 static ULONG WINAPI httprequest_Safety_Release(IObjectSafety *iface)
 {
     httprequest *This = impl_from_IObjectSafety(iface);
-    return IXMLHTTPRequest_Release((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
 }
 
 static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid,




More information about the wine-cvs mailing list