From 3070dcee3b05e3124eae522fa210ec728b6bac21 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Fri, 23 Nov 2012 09:47:05 +0100 Subject: [PATCH] strmbase: Simplify IEnumMediaTypesImpl_QueryInterface and turn FIXME into WARN. --- dlls/strmbase/mediatype.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/dlls/strmbase/mediatype.c b/dlls/strmbase/mediatype.c index a1687558237..d100cc9e8c9 100644 --- a/dlls/strmbase/mediatype.c +++ b/dlls/strmbase/mediatype.c @@ -145,24 +145,21 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e return S_OK; } -static HRESULT WINAPI IEnumMediaTypesImpl_QueryInterface(IEnumMediaTypes * iface, REFIID riid, LPVOID * ppv) +static HRESULT WINAPI IEnumMediaTypesImpl_QueryInterface(IEnumMediaTypes * iface, REFIID riid, void ** ret_iface) { - TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv); + TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface); - *ppv = NULL; - - if (IsEqualIID(riid, &IID_IUnknown)) - *ppv = iface; - else if (IsEqualIID(riid, &IID_IEnumMediaTypes)) - *ppv = iface; - - if (*ppv) + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IEnumMediaTypes)) { - IUnknown_AddRef((IUnknown *)(*ppv)); + IEnumMediaTypes_AddRef(iface); + *ret_iface = iface; return S_OK; } - FIXME("No interface for %s!\n", debugstr_guid(riid)); + *ret_iface = NULL; + + WARN("No interface for %s\n", debugstr_guid(riid)); return E_NOINTERFACE; }