From ee0344a4a2e3347ddf32cba7d12260b0497a1632 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 22 Dec 2004 15:13:20 +0000 Subject: [PATCH] Remove unneeded NULL casts. --- dlls/dmband/band.c | 2 +- dlls/dmband/bandtrack.c | 2 +- dlls/dmcompos/chordmap.c | 2 +- dlls/dmcompos/chordmaptrack.c | 2 +- dlls/dmcompos/signposttrack.c | 2 +- dlls/dmime/audiopath.c | 2 +- dlls/dmime/graph.c | 2 +- dlls/dmime/lyricstrack.c | 2 +- dlls/dmime/markertrack.c | 2 +- dlls/dmime/paramcontroltrack.c | 2 +- dlls/dmime/patterntrack.c | 2 +- dlls/dmime/segment.c | 2 +- dlls/dmime/segmentstate.c | 2 +- dlls/dmime/segtriggertrack.c | 2 +- dlls/dmime/seqtrack.c | 2 +- dlls/dmime/sysextrack.c | 2 +- dlls/dmime/tempotrack.c | 2 +- dlls/dmime/timesigtrack.c | 2 +- dlls/dmime/tool.c | 2 +- dlls/dmime/wavetrack.c | 2 +- dlls/dmloader/container.c | 2 +- dlls/dmloader/loaderstream.c | 6 +++--- dlls/dmscript/scripttrack.c | 2 +- dlls/dmstyle/auditiontrack.c | 2 +- dlls/dmstyle/chordtrack.c | 2 +- dlls/dmstyle/commandtrack.c | 2 +- dlls/dmstyle/motiftrack.c | 2 +- dlls/dmstyle/mutetrack.c | 2 +- dlls/dmstyle/style.c | 2 +- dlls/dmstyle/styletrack.c | 2 +- dlls/dmusic/buffer.c | 2 +- dlls/dmusic/collection.c | 2 +- dlls/dmusic/download.c | 2 +- dlls/dmusic/downloadedinstrument.c | 2 +- dlls/dmusic/instrument.c | 2 +- dlls/dswave/dswave.c | 2 +- dlls/msvideo/msvideo_main.c | 2 +- dlls/shlwapi/ordinal.c | 10 +++++----- dlls/winmm/mmio.c | 2 +- dlls/wintab32/wintab32.c | 4 ++-- programs/regedit/framewnd.c | 2 +- programs/regedit/main.c | 2 +- 42 files changed, 49 insertions(+), 49 deletions(-) diff --git a/dlls/dmband/band.c b/dlls/dmband/band.c index 362ba0dd406..c9c5f3d2502 100644 --- a/dlls/dmband/band.c +++ b/dlls/dmband/band.c @@ -682,7 +682,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj, obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicBand_Unknown_Vtbl; diff --git a/dlls/dmband/bandtrack.c b/dlls/dmband/bandtrack.c index 6fb2edb772f..1dc117a1ebc 100644 --- a/dlls/dmband/bandtrack.c +++ b/dlls/dmband/bandtrack.c @@ -582,7 +582,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPVOID *ppobj track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicBandTrack_Unknown_Vtbl; diff --git a/dlls/dmcompos/chordmap.c b/dlls/dmcompos/chordmap.c index 5463d43877f..6b140335aee 100644 --- a/dlls/dmcompos/chordmap.c +++ b/dlls/dmcompos/chordmap.c @@ -522,7 +522,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapImpl (LPCGUID lpcGUID, LPVOID* pp obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapImpl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicChordMap_Unknown_Vtbl; diff --git a/dlls/dmcompos/chordmaptrack.c b/dlls/dmcompos/chordmaptrack.c index d5b5824dfb6..8fe1c63ab34 100644 --- a/dlls/dmcompos/chordmaptrack.c +++ b/dlls/dmcompos/chordmaptrack.c @@ -265,7 +265,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapTrack (LPCGUID lpcGUID, LPVOID *p track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicChordMapTrack_Unknown_Vtbl; diff --git a/dlls/dmcompos/signposttrack.c b/dlls/dmcompos/signposttrack.c index f9c4c9aa4b9..104cef18e6b 100644 --- a/dlls/dmcompos/signposttrack.c +++ b/dlls/dmcompos/signposttrack.c @@ -263,7 +263,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSignPostTrack (LPCGUID lpcGUID, LPVOID *p track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSignPostTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicSignPostTrack_Unknown_Vtbl; diff --git a/dlls/dmime/audiopath.c b/dlls/dmime/audiopath.c index 24e7b2b1a02..0ade545ef32 100644 --- a/dlls/dmime/audiopath.c +++ b/dlls/dmime/audiopath.c @@ -631,7 +631,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID* p obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAudioPathImpl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicAudioPath_Unknown_Vtbl; diff --git a/dlls/dmime/graph.c b/dlls/dmime/graph.c index 505d6101292..b4e7cd908ae 100644 --- a/dlls/dmime/graph.c +++ b/dlls/dmime/graph.c @@ -596,7 +596,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID* ppobj obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicGraphImpl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicGraph_Unknown_Vtbl; diff --git a/dlls/dmime/lyricstrack.c b/dlls/dmime/lyricstrack.c index 880dc01ace9..975f00561d8 100644 --- a/dlls/dmime/lyricstrack.c +++ b/dlls/dmime/lyricstrack.c @@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID *ppo track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLyricsTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicLyricsTrack_Unknown_Vtbl; diff --git a/dlls/dmime/markertrack.c b/dlls/dmime/markertrack.c index 171d03212a3..f6ed666277d 100644 --- a/dlls/dmime/markertrack.c +++ b/dlls/dmime/markertrack.c @@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID *ppo track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMarkerTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicMarkerTrack_Unknown_Vtbl; diff --git a/dlls/dmime/paramcontroltrack.c b/dlls/dmime/paramcontroltrack.c index d9e471f5b77..3201b281e83 100644 --- a/dlls/dmime/paramcontroltrack.c +++ b/dlls/dmime/paramcontroltrack.c @@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOI track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicParamControlTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicParamControlTrack_Unknown_Vtbl; diff --git a/dlls/dmime/patterntrack.c b/dlls/dmime/patterntrack.c index 4287ca88e16..dc54628af3d 100644 --- a/dlls/dmime/patterntrack.c +++ b/dlls/dmime/patterntrack.c @@ -87,7 +87,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPatternTrackImpl (LPCGUID lpcGUID, LPVOID track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPatternTrackImpl)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->lpVtbl = &DirectMusicPatternTrack_Vtbl; diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index abc212bbc17..f96f746ff35 100644 --- a/dlls/dmime/segment.c +++ b/dlls/dmime/segment.c @@ -1283,7 +1283,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID* ppo obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegment8Impl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicSegment8_Unknown_Vtbl; diff --git a/dlls/dmime/segmentstate.c b/dlls/dmime/segmentstate.c index 172ccb45eea..adc2dfcdfec 100644 --- a/dlls/dmime/segmentstate.c +++ b/dlls/dmime/segmentstate.c @@ -116,7 +116,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegmentState8Impl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->lpVtbl = &DirectMusicSegmentState8_Vtbl; diff --git a/dlls/dmime/segtriggertrack.c b/dlls/dmime/segtriggertrack.c index 0a6dc1073d3..3e396e12916 100644 --- a/dlls/dmime/segtriggertrack.c +++ b/dlls/dmime/segtriggertrack.c @@ -506,7 +506,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegTriggerTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicSegTriggerTrack_Unknown_Vtbl; diff --git a/dlls/dmime/seqtrack.c b/dlls/dmime/seqtrack.c index 500ed4a8e79..6601633fcc4 100644 --- a/dlls/dmime/seqtrack.c +++ b/dlls/dmime/seqtrack.c @@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID *ppobj, track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSeqTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicSeqTrack_Unknown_Vtbl; diff --git a/dlls/dmime/sysextrack.c b/dlls/dmime/sysextrack.c index a949a790947..eb5c6d2358d 100644 --- a/dlls/dmime/sysextrack.c +++ b/dlls/dmime/sysextrack.c @@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID *ppob track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSysExTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicSysExTrack_Unknown_Vtbl; diff --git a/dlls/dmime/tempotrack.c b/dlls/dmime/tempotrack.c index 86c73dcb54b..1e3a07fc47e 100644 --- a/dlls/dmime/tempotrack.c +++ b/dlls/dmime/tempotrack.c @@ -393,7 +393,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID *ppob track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTempoTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicTempoTrack_Unknown_Vtbl; diff --git a/dlls/dmime/timesigtrack.c b/dlls/dmime/timesigtrack.c index b90718c784d..ea96bcab2a4 100644 --- a/dlls/dmime/timesigtrack.c +++ b/dlls/dmime/timesigtrack.c @@ -264,7 +264,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID *pp track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTimeSigTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicTimeSigTrack_Unknown_Vtbl; diff --git a/dlls/dmime/tool.c b/dlls/dmime/tool.c index 1927927a62e..8c285ab628e 100644 --- a/dlls/dmime/tool.c +++ b/dlls/dmime/tool.c @@ -115,7 +115,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicobjImpl (LPCGUID lpcGUID, LPVOID *ppobj, obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTool8Impl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->lpVtbl = &DirectMusicTool8_Vtbl; diff --git a/dlls/dmime/wavetrack.c b/dlls/dmime/wavetrack.c index 66207f2c7fd..f3d67a4423e 100644 --- a/dlls/dmime/wavetrack.c +++ b/dlls/dmime/wavetrack.c @@ -265,7 +265,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID *ppobj track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicWaveTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicWaveTrack_Unknown_Vtbl; diff --git a/dlls/dmloader/container.c b/dlls/dmloader/container.c index ce5a6a6eb1b..0a006c426c4 100644 --- a/dlls/dmloader/container.c +++ b/dlls/dmloader/container.c @@ -886,7 +886,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicContainerImpl (LPCGUID lpcGUID, LPVOID* p obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicContainerImpl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->ContainerVtbl = &DirectMusicContainer_Container_Vtbl; diff --git a/dlls/dmloader/loaderstream.c b/dlls/dmloader/loaderstream.c index bcd21528751..3ecc7eab5a6 100644 --- a/dlls/dmloader/loaderstream.c +++ b/dlls/dmloader/loaderstream.c @@ -286,7 +286,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderFileStream (LPVOID* ppobj) { TRACE("(%p)\n", ppobj); obj = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoaderFileStream)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->StreamVtbl = &DirectMusicLoaderFileStream_Stream_Vtbl; @@ -552,7 +552,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderResourceStream (LPVOID* ppobj) { TRACE("(%p)\n", ppobj); obj = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoaderResourceStream)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->StreamVtbl = &DirectMusicLoaderResourceStream_Stream_Vtbl; @@ -810,7 +810,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicLoaderGenericStream (LPVOID* ppobj) { TRACE("(%p)\n", ppobj); obj = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLoaderGenericStream)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->StreamVtbl = &DirectMusicLoaderGenericStream_Stream_Vtbl; diff --git a/dlls/dmscript/scripttrack.c b/dlls/dmscript/scripttrack.c index bbea145f401..31865ea81a3 100644 --- a/dlls/dmscript/scripttrack.c +++ b/dlls/dmscript/scripttrack.c @@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicScriptTrack (LPCGUID lpcGUID, LPVOID *ppo track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicScriptTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicScriptTrack_Unknown_Vtbl; diff --git a/dlls/dmstyle/auditiontrack.c b/dlls/dmstyle/auditiontrack.c index ffbbcf5b10a..02196fd04f1 100644 --- a/dlls/dmstyle/auditiontrack.c +++ b/dlls/dmstyle/auditiontrack.c @@ -259,7 +259,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicAuditionTrack (LPCGUID lpcGUID, LPVOID *p track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAuditionTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicAuditionTrack_Unknown_Vtbl; diff --git a/dlls/dmstyle/chordtrack.c b/dlls/dmstyle/chordtrack.c index cb0dadf2f18..a5e28b9cd4f 100644 --- a/dlls/dmstyle/chordtrack.c +++ b/dlls/dmstyle/chordtrack.c @@ -387,7 +387,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicChordTrack (LPCGUID lpcGUID, LPVOID *ppob track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicChordTrack_Unknown_Vtbl; diff --git a/dlls/dmstyle/commandtrack.c b/dlls/dmstyle/commandtrack.c index 1fa64825bbc..217064324b5 100644 --- a/dlls/dmstyle/commandtrack.c +++ b/dlls/dmstyle/commandtrack.c @@ -321,7 +321,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicCommandTrack (LPCGUID lpcGUID, LPVOID *pp track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicCommandTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicCommandTrack_Unknown_Vtbl; diff --git a/dlls/dmstyle/motiftrack.c b/dlls/dmstyle/motiftrack.c index 372bfdb0c3d..55edaa72982 100644 --- a/dlls/dmstyle/motiftrack.c +++ b/dlls/dmstyle/motiftrack.c @@ -265,7 +265,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicMotifTrack (LPCGUID lpcGUID, LPVOID *ppob track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMotifTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicMotifTrack_Unknown_Vtbl; diff --git a/dlls/dmstyle/mutetrack.c b/dlls/dmstyle/mutetrack.c index 88bb1b228e0..b124ab33c5d 100644 --- a/dlls/dmstyle/mutetrack.c +++ b/dlls/dmstyle/mutetrack.c @@ -262,7 +262,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicMuteTrack (LPCGUID lpcGUID, LPVOID *ppobj track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMuteTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicMuteTrack_Unknown_Vtbl; diff --git a/dlls/dmstyle/style.c b/dlls/dmstyle/style.c index 2941a634473..49b8080b296 100644 --- a/dlls/dmstyle/style.c +++ b/dlls/dmstyle/style.c @@ -1041,7 +1041,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicStyleImpl (LPCGUID lpcGUID, LPVOID* ppobj obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicStyle8Impl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicStyle8_Unknown_Vtbl; diff --git a/dlls/dmstyle/styletrack.c b/dlls/dmstyle/styletrack.c index 5b2d61c4d71..04f83545a4d 100644 --- a/dlls/dmstyle/styletrack.c +++ b/dlls/dmstyle/styletrack.c @@ -432,7 +432,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicStyleTrack (LPCGUID lpcGUID, LPVOID *ppob track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicStyleTrack)); if (NULL == track) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } track->UnknownVtbl = &DirectMusicStyleTrack_Unknown_Vtbl; diff --git a/dlls/dmusic/buffer.c b/dlls/dmusic/buffer.c index 53e3cb2d628..a19ebbe516b 100644 --- a/dlls/dmusic/buffer.c +++ b/dlls/dmusic/buffer.c @@ -155,7 +155,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicBufferImpl (LPCGUID lpcGUID, LPVOID* ppob dmbuff = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBufferImpl)); if (NULL == dmbuff) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } dmbuff->lpVtbl = &DirectMusicBuffer_Vtbl; diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index ec418af58f4..7193939e72d 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -742,7 +742,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl (LPCGUID lpcGUID, LPVOID* obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicCollectionImpl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicCollection_Unknown_Vtbl; diff --git a/dlls/dmusic/download.c b/dlls/dmusic/download.c index e1878a15d87..1c06c2f2c7b 100644 --- a/dlls/dmusic/download.c +++ b/dlls/dmusic/download.c @@ -72,7 +72,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadImpl (LPCGUID lpcGUID, LPVOID* pp dmdl = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadImpl)); if (NULL == dmdl) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } dmdl->lpVtbl = &DirectMusicDownload_Vtbl; diff --git a/dlls/dmusic/downloadedinstrument.c b/dlls/dmusic/downloadedinstrument.c index 14baa118b7c..ccf86fa4250 100644 --- a/dlls/dmusic/downloadedinstrument.c +++ b/dlls/dmusic/downloadedinstrument.c @@ -67,7 +67,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicDownloadedInstrumentImpl (LPCGUID lpcGUID dmdlinst = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicDownloadedInstrumentImpl)); if (NULL == dmdlinst) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } dmdlinst->lpVtbl = &DirectMusicDownloadedInstrument_Vtbl; diff --git a/dlls/dmusic/instrument.c b/dlls/dmusic/instrument.c index 7bbe59a70d2..c7cfe3a4ee0 100644 --- a/dlls/dmusic/instrument.c +++ b/dlls/dmusic/instrument.c @@ -118,7 +118,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicInstrumentImpl (LPCGUID lpcGUID, LPVOID* dminst = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicInstrumentImpl)); if (NULL == dminst) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } dminst->UnknownVtbl = &DirectMusicInstrument_Unknown_Vtbl; diff --git a/dlls/dswave/dswave.c b/dlls/dswave/dswave.c index 3e657e927b5..df6fe3f48dd 100644 --- a/dlls/dswave/dswave.c +++ b/dlls/dswave/dswave.c @@ -715,7 +715,7 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicWaveImpl (LPCGUID lpcGUID, LPVOID* ppobj, obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicWaveImpl)); if (NULL == obj) { - *ppobj = (LPVOID) NULL; + *ppobj = NULL; return E_OUTOFMEMORY; } obj->UnknownVtbl = &DirectMusicWave_Unknown_Vtbl; diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 0dc97b1a9e1..32f852e94a9 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -438,7 +438,7 @@ HIC MSVIDEO_OpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, whic->driverId = (DWORD)MSVIDEO_SendMessage(whic, DRV_OPEN, 0, (DWORD)&icopen); /* FIXME: What should we put here? */ - whic->hdrv = (HDRVR)0; + whic->hdrv = NULL; if (whic->driverId == 0) { diff --git a/dlls/shlwapi/ordinal.c b/dlls/shlwapi/ordinal.c index b409a6cf412..8d4042189f2 100644 --- a/dlls/shlwapi/ordinal.c +++ b/dlls/shlwapi/ordinal.c @@ -1936,7 +1936,7 @@ HMENU WINAPI SHGetMenuFromID(HMENU hMenu, UINT uID) mi.fMask = MIIM_SUBMENU; if (!GetMenuItemInfoA(hMenu, uID, 0, &mi)) - return (HMENU)NULL; + return NULL; return mi.hSubMenu; } @@ -2418,8 +2418,8 @@ HWND WINAPI SHCreateWorkerWindowA(LONG wndProc, HWND hWndParent, DWORD dwExStyle wc.cbClsExtra = 0; wc.cbWndExtra = 4; wc.hInstance = shlwapi_hInstance; - wc.hIcon = (HICON)0; - wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW); + wc.hIcon = NULL; + wc.hCursor = LoadCursorA(NULL, (LPSTR)IDC_ARROW); wc.hbrBackground = (HBRUSH)COLOR_BTNSHADOW; wc.lpszMenuName = NULL; wc.lpszClassName = szClass; @@ -2705,8 +2705,8 @@ HWND WINAPI SHCreateWorkerWindowW(LONG wndProc, HWND hWndParent, DWORD dwExStyle wc.cbClsExtra = 0; wc.cbWndExtra = 4; wc.hInstance = shlwapi_hInstance; - wc.hIcon = (HICON)0; - wc.hCursor = LoadCursorA((HINSTANCE)0, (LPSTR)IDC_ARROW); + wc.hIcon = NULL; + wc.hCursor = LoadCursorA(NULL, (LPSTR)IDC_ARROW); wc.hbrBackground = (HBRUSH)COLOR_BTNSHADOW; wc.lpszMenuName = NULL; wc.lpszClassName = szClass; diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index d6736dd53fa..673ed39e52d 100644 --- a/dlls/winmm/mmio.c +++ b/dlls/winmm/mmio.c @@ -703,7 +703,7 @@ HMMIO WINAPI mmioOpenW(LPWSTR szFileName, MMIOINFO* lpmmioinfo, { INT len = WideCharToMultiByte( CP_ACP, 0, szFileName, -1, NULL, 0, NULL, NULL ); szFn = HeapAlloc( GetProcessHeap(), 0, len ); - if (!szFn) return (HMMIO)NULL; + if (!szFn) return NULL; WideCharToMultiByte( CP_ACP, 0, szFileName, -1, szFn, len, NULL, NULL ); } diff --git a/dlls/wintab32/wintab32.c b/dlls/wintab32/wintab32.c index 686701c990b..841c21aa51b 100644 --- a/dlls/wintab32/wintab32.c +++ b/dlls/wintab32/wintab32.c @@ -52,7 +52,7 @@ static VOID TABLET_Register() wndClass.lpfnWndProc = TABLET_WindowProc; wndClass.cbClsExtra = 0; wndClass.cbWndExtra = 0; - wndClass.hCursor = (HCURSOR)NULL; + wndClass.hCursor = NULL; wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW +1); wndClass.lpszClassName = WC_TABLETCLASSNAME; RegisterClassW(&wndClass); @@ -60,7 +60,7 @@ static VOID TABLET_Register() static VOID TABLET_Unregister() { - UnregisterClassW(WC_TABLETCLASSNAME, (HINSTANCE)NULL); + UnregisterClassW(WC_TABLETCLASSNAME, NULL); } BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved) diff --git a/programs/regedit/framewnd.c b/programs/regedit/framewnd.c index 8c22abca260..5e21e3bd6cb 100644 --- a/programs/regedit/framewnd.c +++ b/programs/regedit/framewnd.c @@ -573,7 +573,7 @@ LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa case WM_CREATE: CreateWindowEx(0, szChildClass, _T("regedit child window"), WS_CHILD | WS_VISIBLE, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - hWnd, (HMENU)0, hInst, 0); + hWnd, NULL, hInst, 0); break; case WM_COMMAND: if (!_CmdWndProc(hWnd, message, wParam, lParam)) diff --git a/programs/regedit/main.c b/programs/regedit/main.c index 457ed7b3a41..0e2f534a99f 100644 --- a/programs/regedit/main.c +++ b/programs/regedit/main.c @@ -181,7 +181,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, hAccel = LoadAccelerators(hInstance, (LPCTSTR)IDC_REGEDIT); /* Main message loop */ - while (GetMessage(&msg, (HWND)NULL, 0, 0)) { + while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(hFrameWnd, hAccel, &msg) && !TranslateChildTabMessage(&msg)) { TranslateMessage(&msg);