strmbase: Remove some redundant return value initializers.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2015-10-19 11:57:50 +03:00 committed by Alexandre Julliard
parent 08a3e4f29f
commit 7dd00af747
9 changed files with 16 additions and 21 deletions

View File

@ -70,8 +70,8 @@ HRESULT WINAPI BasicAudioImpl_GetIDsOfNames(IBasicAudio *iface, REFIID riid, LPO
HRESULT WINAPI BasicAudioImpl_Invoke(IBasicAudio *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
{
BasicAudio *This = impl_from_IBasicAudio(iface);
HRESULT hr = S_OK;
ITypeInfo *pTypeInfo;
HRESULT hr;
hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo);
if (SUCCEEDED(hr))

View File

@ -29,8 +29,8 @@
HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid)
{
HRESULT hr = E_FAIL;
ITypeLib *pTypeLib;
HRESULT hr;
This->pTypeInfo = NULL;
hr = LoadRegTypeLib(&LIBID_QuartzTypeLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &pTypeLib);

View File

@ -158,7 +158,6 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName )
{
HRESULT hr = S_OK;
BaseFilter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%p, %s)\n", This, pGraph, debugstr_w(pName));
@ -173,7 +172,7 @@ HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph
}
LeaveCriticalSection(&This->csFilter);
return hr;
return S_OK;
}
HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)

View File

@ -68,7 +68,6 @@ HRESULT WINAPI OutputQueue_Construct(
OutputQueue **ppOutputQueue )
{
HRESULT hr = S_OK;
BOOL threaded = FALSE;
DWORD tid;
@ -116,7 +115,7 @@ HRESULT WINAPI OutputQueue_Construct(
}
LeaveCriticalSection(&This->csQueue);
return hr;
return S_OK;
}
HRESULT WINAPI OutputQueue_Destroy(OutputQueue *pOutputQueue)

View File

@ -575,9 +575,9 @@ HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin *This, IMediaSa
/* replaces OutputPin_SendSample */
HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSample)
{
HRESULT hr = S_OK;
IMemInputPin * pMemConnected = NULL;
PIN_INFO pinInfo;
HRESULT hr;
EnterCriticalSection(This->pin.pCritSec);
{
@ -615,7 +615,7 @@ HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin *This, IMediaSample * pSa
/* replaces OutputPin_CommitAllocator */
HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This)
{
HRESULT hr = S_OK;
HRESULT hr;
TRACE("(%p)->()\n", This);
@ -635,7 +635,7 @@ HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin *This)
/* replaces OutputPin_DecommitAllocator */
HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin *This)
{
HRESULT hr = S_OK;
HRESULT hr;
TRACE("(%p)->()\n", This);
@ -875,12 +875,9 @@ ULONG WINAPI BaseInputPinImpl_Release(IPin * iface)
TRACE("(%p)->() Release from %d\n", iface, refCount + 1);
if (!refCount)
{
BaseInputPin_Destroy(This);
return 0;
}
else
return refCount;
return refCount;
}
HRESULT WINAPI BaseInputPinImpl_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt)

View File

@ -60,7 +60,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin * iface, IPin
{
BaseInputPin *This = impl_BaseInputPin_from_IPin(iface);
BaseRenderer *renderer = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
HRESULT hr = S_OK;
HRESULT hr;
TRACE("(%p/%p)->(%p, %p)\n", This, renderer, pReceivePin, pmt);
@ -99,7 +99,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
{
HRESULT hr = S_OK;
HRESULT hr;
BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
BaseRenderer *pFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
@ -126,7 +126,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
{
BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
BaseRenderer *pFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
HRESULT hr = S_OK;
HRESULT hr;
TRACE("(%p/%p)->()\n", This, iface);
@ -151,7 +151,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface)
{
BaseInputPin* This = impl_BaseInputPin_from_IPin(iface);
BaseRenderer *pFilter = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);
HRESULT hr = S_OK;
HRESULT hr;
TRACE("(%p/%p)->()\n", This, pFilter);

View File

@ -93,7 +93,7 @@ static HRESULT WINAPI TransformFilter_Input_CheckMediaType(BasePin *iface, const
static HRESULT WINAPI TransformFilter_Input_Receive(BaseInputPin *This, IMediaSample *pInSample)
{
HRESULT hr = S_FALSE;
HRESULT hr;
TransformFilter * pTransform;
TRACE("%p\n", This);
pTransform = impl_from_IBaseFilter(This->pin.pinInfo.pFilter);

View File

@ -77,8 +77,8 @@ HRESULT WINAPI BaseControlVideoImpl_GetIDsOfNames(IBasicVideo *iface, REFIID rii
HRESULT WINAPI BaseControlVideoImpl_Invoke(IBasicVideo *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
{
BaseControlVideo *This = impl_from_IBasicVideo(iface);
HRESULT hr = S_OK;
ITypeInfo *pTypeInfo;
HRESULT hr;
hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo);
if (SUCCEEDED(hr))

View File

@ -250,8 +250,8 @@ HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID r
HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
{
BaseControlWindow* This = impl_from_IVideoWindow(iface);
HRESULT hr = S_OK;
ITypeInfo *pTypeInfo;
HRESULT hr;
hr = BaseDispatchImpl_GetTypeInfo(&This->baseDispatch, riid, 1, lcid, &pTypeInfo);
if (SUCCEEDED(hr))