Module: wine Branch: master Commit: 4ffcf3359da132a4699e1f1e829e271c3ae18f7d URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ffcf3359da132a4699e1f1e82...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Jul 30 10:36:44 2012 +0200
urlmon: SecManagerImpl_QueryInterface clean up.
---
dlls/urlmon/sec_mgr.c | 24 ++++++++---------------- 1 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c index df90ce1..477f89e 100644 --- a/dlls/urlmon/sec_mgr.c +++ b/dlls/urlmon/sec_mgr.c @@ -854,31 +854,23 @@ static HRESULT WINAPI SecManagerImpl_QueryInterface(IInternetSecurityManagerEx2* { SecManagerImpl *This = impl_from_IInternetSecurityManagerEx2(iface);
- TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppvObject); + TRACE("(%p)->(%s %p)\n",This,debugstr_guid(riid),ppvObject);
- /* Perform a sanity check on the parameters.*/ - if ( (This==0) || (ppvObject==0) ) + if(!ppvObject) return E_INVALIDARG;
- /* Initialize the return parameter */ - *ppvObject = 0; - - /* Compare the riid with the interface IDs implemented by this object.*/ - if (IsEqualIID(&IID_IUnknown, riid) || - IsEqualIID(&IID_IInternetSecurityManager, riid) || - IsEqualIID(&IID_IInternetSecurityManagerEx, riid) || - IsEqualIID(&IID_IInternetSecurityManagerEx2, riid)) + if(IsEqualIID(&IID_IUnknown, riid) || + IsEqualIID(&IID_IInternetSecurityManager, riid) || + IsEqualIID(&IID_IInternetSecurityManagerEx, riid) || + IsEqualIID(&IID_IInternetSecurityManagerEx2, riid)) { *ppvObject = iface; - - /* Check that we obtained an interface.*/ - if (!*ppvObject) { + } else { WARN("not supported interface %s\n", debugstr_guid(riid)); + *ppvObject = NULL; return E_NOINTERFACE; }
- /* Query Interface always increases the reference count by one when it is successful */ IInternetSecurityManagerEx2_AddRef(iface); - return S_OK; }