Commit 53517002 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmime: Remove ERR() on HeapAlloc failure for small sizes known at compile time.

parent 536bdfde
......@@ -246,10 +246,9 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_InsertTrack
}
pNewSegTrack = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_TRACK));
if (NULL == pNewSegTrack) {
ERR(": no more memory\n");
if (NULL == pNewSegTrack)
return E_OUTOFMEMORY;
}
pNewSegTrack->dwGroupBits = dwGroupBits;
pNewSegTrack->pTrack = pTrack;
IDirectMusicTrack_Init(pTrack, (IDirectMusicSegment *)iface);
......
......@@ -274,10 +274,9 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS
TRACE_(dmfile)(": segment item chunk\n");
/** alloc new item entry */
pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_ITEM));
if (!pNewItem) {
ERR(": no more memory\n");
return E_OUTOFMEMORY;
}
if (!pNewItem)
return E_OUTOFMEMORY;
IStream_Read (pStm, &pNewItem->header, sizeof(DMUS_IO_SEGMENT_ITEM_HEADER), NULL);
TRACE_(dmfile)(" - lTimePhysical: %u\n", pNewItem->header.lTimeLogical);
TRACE_(dmfile)(" - lTimePhysical: %u\n", pNewItem->header.lTimePhysical);
......
......@@ -113,10 +113,9 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_InitPlay (LPDIREC
FIXME("(%p, %p, %p, %p, %d, %d): semi-stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags);
pState = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_PLAY_STATE));
if (NULL == pState) {
ERR(": no more memory\n");
if (NULL == pState)
return E_OUTOFMEMORY;
}
/** TODO real fill useful data */
pState->dummy = 0;
*ppStateData = pState;
......@@ -348,10 +347,9 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA
TRACE_(dmfile)(" - lTime = %u\n", item.lTime);
TRACE_(dmfile)(" - dblTempo = %g\n", item.dblTempo);
pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_ITEM));
if (NULL == pNewItem) {
ERR(": no more memory\n");
return E_OUTOFMEMORY;
}
if (NULL == pNewItem)
return E_OUTOFMEMORY;
pNewItem->item = item;
list_add_tail (&This->Items, &pNewItem->entry);
pNewItem = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment