From 71a3fe3c9452fb5c54291ca2e4204a5e19919d67 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Sat, 23 Oct 2010 23:23:07 +0400 Subject: [PATCH] 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 3c8c91f9f66..24d18b7d2a4 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 7c0a11221cf..0b084326750 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; -- 2.11.4.GIT