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 ...@@ -246,10 +246,9 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_InsertTrack
} }
pNewSegTrack = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_TRACK)); pNewSegTrack = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_TRACK));
if (NULL == pNewSegTrack) { if (NULL == pNewSegTrack)
ERR(": no more memory\n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
}
pNewSegTrack->dwGroupBits = dwGroupBits; pNewSegTrack->dwGroupBits = dwGroupBits;
pNewSegTrack->pTrack = pTrack; pNewSegTrack->pTrack = pTrack;
IDirectMusicTrack_Init(pTrack, (IDirectMusicSegment *)iface); IDirectMusicTrack_Init(pTrack, (IDirectMusicSegment *)iface);
......
...@@ -274,10 +274,9 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS ...@@ -274,10 +274,9 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS
TRACE_(dmfile)(": segment item chunk\n"); TRACE_(dmfile)(": segment item chunk\n");
/** alloc new item entry */ /** alloc new item entry */
pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_ITEM)); pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_ITEM));
if (!pNewItem) { if (!pNewItem)
ERR(": no more memory\n"); return E_OUTOFMEMORY;
return E_OUTOFMEMORY;
}
IStream_Read (pStm, &pNewItem->header, sizeof(DMUS_IO_SEGMENT_ITEM_HEADER), NULL); 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.lTimeLogical);
TRACE_(dmfile)(" - lTimePhysical: %u\n", pNewItem->header.lTimePhysical); TRACE_(dmfile)(" - lTimePhysical: %u\n", pNewItem->header.lTimePhysical);
......
...@@ -113,10 +113,9 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_InitPlay (LPDIREC ...@@ -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); 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)); pState = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_PLAY_STATE));
if (NULL == pState) { if (NULL == pState)
ERR(": no more memory\n");
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
}
/** TODO real fill useful data */ /** TODO real fill useful data */
pState->dummy = 0; pState->dummy = 0;
*ppStateData = pState; *ppStateData = pState;
...@@ -348,10 +347,9 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA ...@@ -348,10 +347,9 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA
TRACE_(dmfile)(" - lTime = %u\n", item.lTime); TRACE_(dmfile)(" - lTime = %u\n", item.lTime);
TRACE_(dmfile)(" - dblTempo = %g\n", item.dblTempo); TRACE_(dmfile)(" - dblTempo = %g\n", item.dblTempo);
pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_ITEM)); pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_ITEM));
if (NULL == pNewItem) { if (NULL == pNewItem)
ERR(": no more memory\n"); return E_OUTOFMEMORY;
return E_OUTOFMEMORY;
}
pNewItem->item = item; pNewItem->item = item;
list_add_tail (&This->Items, &pNewItem->entry); list_add_tail (&This->Items, &pNewItem->entry);
pNewItem = NULL; 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