From c954d50b1650ac6b08d74a49926fd4cb217a9b59 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 22 Apr 2015 13:07:07 +0200 Subject: [PATCH] d3dxof: Don't ERR on alloc failures for small compile time known sizes. --- dlls/d3dxof/d3dxof.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/dlls/d3dxof/d3dxof.c b/dlls/d3dxof/d3dxof.c index 8888d8b18ee..8aa6c212f67 100644 --- a/dlls/d3dxof/d3dxof.c +++ b/dlls/d3dxof/d3dxof.c @@ -56,10 +56,7 @@ HRESULT IDirectXFileImpl_Create(IUnknown* pUnkOuter, LPVOID* ppObj) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFile_iface.lpVtbl = &IDirectXFile_Vtbl; object->ref = 1; @@ -373,10 +370,7 @@ static HRESULT IDirectXFileBinaryImpl_Create(IDirectXFileBinaryImpl** ppObj) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileBinaryImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileBinary_iface.lpVtbl = &IDirectXFileBinary_Vtbl; object->ref = 1; @@ -506,10 +500,7 @@ static HRESULT IDirectXFileDataImpl_Create(IDirectXFileDataImpl** ppObj) object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileData_iface.lpVtbl = &IDirectXFileData_Vtbl; object->ref = 1; @@ -784,10 +775,7 @@ static HRESULT IDirectXFileDataReferenceImpl_Create(IDirectXFileDataReferenceImp object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileDataReferenceImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileDataReference_iface.lpVtbl = &IDirectXFileDataReference_Vtbl; object->ref = 1; @@ -935,10 +923,7 @@ static HRESULT IDirectXFileEnumObjectImpl_Create(IDirectXFileEnumObjectImpl** pp object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileEnumObjectImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileEnumObject_iface.lpVtbl = &IDirectXFileEnumObject_Vtbl; object->ref = 1; @@ -1037,7 +1022,6 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE object->pobj = HeapAlloc(GetProcessHeap(), 0, sizeof(xobject)*MAX_SUBOBJECTS); if (!object->pobj) { - ERR("Out of memory\n"); hr = DXFILEERR_BADALLOC; goto error; } @@ -1045,7 +1029,6 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE object->pstrings = HeapAlloc(GetProcessHeap(), 0, MAX_STRINGS_BUFFER); if (!object->pstrings) { - ERR("Out of memory\n"); hr = DXFILEERR_BADALLOC; goto error; } @@ -1125,10 +1108,7 @@ static HRESULT IDirectXFileSaveObjectImpl_Create(IDirectXFileSaveObjectImpl** pp object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectXFileSaveObjectImpl)); if (!object) - { - ERR("Out of memory\n"); return DXFILEERR_BADALLOC; - } object->IDirectXFileSaveObject_iface.lpVtbl = &IDirectXFileSaveObject_Vtbl; object->ref = 1;