From 76b910514ef060dd981646768ff0be9d26748d77 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 8 Feb 2013 10:29:36 +0100 Subject: [PATCH] amstream: Remove ERR() on HeapAlloc failure for small sizes known at compile time. --- dlls/amstream/amstream.c | 3 --- dlls/amstream/audiodata.c | 3 --- dlls/amstream/mediastream.c | 12 ------------ dlls/amstream/mediastreamfilter.c | 3 --- 4 files changed, 21 deletions(-) diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index 94066a1c648..800e48d71ab 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -63,10 +63,7 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl; object->ref = 1; diff --git a/dlls/amstream/audiodata.c b/dlls/amstream/audiodata.c index 2bd57da4b26..3a62a9f898f 100644 --- a/dlls/amstream/audiodata.c +++ b/dlls/amstream/audiodata.c @@ -143,10 +143,7 @@ HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AMAudioDataImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->IAudioData_iface.lpVtbl = &AudioData_Vtbl; object->ref = 1; diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c index dd037fcd70a..f619cbd23e0 100644 --- a/dlls/amstream/mediastream.c +++ b/dlls/amstream/mediastream.c @@ -436,10 +436,7 @@ HRESULT ddrawmediastream_create(IMultiMediaStream *parent, const MSPID *purpose_ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DirectDrawMediaStreamImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->IAMMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IAMMediaStream_Vtbl; object->IDirectDrawMediaStream_iface.lpVtbl = &DirectDrawMediaStreamImpl_IDirectDrawMediaStream_Vtbl; @@ -839,10 +836,7 @@ HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AudioMediaStreamImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->IAMMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAMMediaStream_Vtbl; object->IAudioMediaStream_iface.lpVtbl = &AudioMediaStreamImpl_IAudioMediaStream_Vtbl; @@ -992,10 +986,7 @@ static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectD object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectDrawStreamSampleImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->IDirectDrawStreamSample_iface.lpVtbl = &DirectDrawStreamSample_Vtbl; object->ref = 1; @@ -1133,10 +1124,7 @@ static HRESULT audiostreamsample_create(IAudioMediaStream *parent, IAudioData *a object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAudioStreamSampleImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } object->IAudioStreamSample_iface.lpVtbl = &AudioStreamSample_Vtbl; object->ref = 1; diff --git a/dlls/amstream/mediastreamfilter.c b/dlls/amstream/mediastreamfilter.c index bfec0f0ab11..49ee6fe7b8c 100644 --- a/dlls/amstream/mediastreamfilter.c +++ b/dlls/amstream/mediastreamfilter.c @@ -516,10 +516,7 @@ HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, void **ppObj) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMediaStreamFilterImpl)); if (!object) - { - ERR("Out of memory\n"); return E_OUTOFMEMORY; - } BaseFilter_Init(&object->filter, (IBaseFilterVtbl*)&MediaStreamFilter_Vtbl, &CLSID_MediaStreamFilter, (DWORD_PTR)(__FILE__ ": MediaStreamFilterImpl.csFilter"), &BaseFuncTable);