dmusic: Do not cast NULL.

This commit is contained in:
Michael Stefaniuc 2008-11-02 00:24:00 +01:00 committed by Alexandre Julliard
parent 706df65c5a
commit 892f735930
2 changed files with 4 additions and 4 deletions

View File

@ -127,7 +127,7 @@ static HRESULT WINAPI IDirectMusic8Impl_CreatePort (LPDIRECTMUSIC8 iface, REFCLS
if (IsEqualCLSID (rclsidPort, &PortCaps.guidPort)) {
hr = DMUSIC_CreateDirectMusicPortImpl(&IID_IDirectMusicPort, (LPVOID*) &pNewPort, (LPUNKNOWN) This, pPortParams, &PortCaps);
if (FAILED(hr)) {
*ppPort = (LPDIRECTMUSICPORT) NULL;
*ppPort = NULL;
return hr;
}
This->nrofports++;
@ -255,7 +255,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPU
dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl));
if (NULL == dmusic) {
*ppobj = (LPDIRECTMUSIC8) NULL;
*ppobj = NULL;
return E_OUTOFMEMORY;
}
dmusic->lpVtbl = &DirectMusic8_Vtbl;

View File

@ -243,8 +243,8 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj,
TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter);
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPortImpl));
if (NULL == obj) {
*ppobj = (LPDIRECTMUSICPORT) NULL;
if (NULL == obj) {
*ppobj = NULL;
return E_OUTOFMEMORY;
}
obj->lpVtbl = &DirectMusicPort_Vtbl;