Module: wine Branch: master Commit: 71a3fe3c9452fb5c54291ca2e4204a5e19919d67 URL: http://source.winehq.org/git/wine.git/?a=commit;h=71a3fe3c9452fb5c54291ca2e4...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sat Oct 23 23:23:07 2010 +0400
oleaut32: Remove some useless null checks.
---
dlls/oleaut32/olefont.c | 11 +---------- dlls/oleaut32/tests/olefont.c | 3 +++ 2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c index 3c8c91f..24d18b7 100644 --- a/dlls/oleaut32/olefont.c +++ b/dlls/oleaut32/olefont.c @@ -480,15 +480,6 @@ static HRESULT WINAPI OLEFontImpl_QueryInterface( OLEFontImpl *this = (OLEFontImpl *)iface; TRACE("(%p)->(%s, %p)\n", this, debugstr_guid(riid), ppvObject);
- /* - * Perform a sanity check on the parameters. - */ - if ( (this==0) || (ppvObject==0) ) - return E_INVALIDARG; - - /* - * Initialize the return parameter. - */ *ppvObject = 0;
/* @@ -1143,7 +1134,7 @@ static HRESULT WINAPI OLEFontImpl_IsEqual( INT ret; INT left_len,right_len;
- if((iface == NULL) || (pFontOther == NULL)) + if(pFontOther == NULL) return E_POINTER; else if (left->description.cySize.s.Lo != right->description.cySize.s.Lo) return S_FALSE; diff --git a/dlls/oleaut32/tests/olefont.c b/dlls/oleaut32/tests/olefont.c index 7c0a112..0b08432 100644 --- a/dlls/oleaut32/tests/olefont.c +++ b/dlls/oleaut32/tests/olefont.c @@ -127,6 +127,9 @@ static void test_QueryInterface(void) IFont* font = NULL; LONG ret;
+ hres = pOleCreateFontIndirect(NULL, &IID_IFont, NULL); + ok(hres == E_POINTER, "got 0x%08x\n", hres); + hres = pOleCreateFontIndirect(NULL, &IID_IFont, &pvObj); font = pvObj;