Marcus Meissner : dmsynth: Remove now useless NULL ptr check (Coverity).

Alexandre Julliard julliard at winehq.org
Tue Jan 8 13:58:41 CST 2013


Module: wine
Branch: master
Commit: 4d5dcdca48b7a3101ea24065d7e7b637aefb3ede
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4d5dcdca48b7a3101ea24065d7e7b637aefb3ede

Author: Marcus Meissner <meissner at suse.de>
Date:   Mon Jan  7 22:17:30 2013 +0100

dmsynth: Remove now useless NULL ptr check (Coverity).

---

 dlls/dmsynth/synth.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c
index 4392230..7a966a8 100644
--- a/dlls/dmsynth/synth.c
+++ b/dlls/dmsynth/synth.c
@@ -126,7 +126,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_SetNumChannelGroups(LPDIRECTMUSICSY
 static HRESULT WINAPI IDirectMusicSynth8Impl_Download(LPDIRECTMUSICSYNTH8 iface, LPHANDLE hDownload, LPVOID data, LPBOOL free)
 {
     IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface);
-    LPBYTE buffer = (LPBYTE)data;
+    LPBYTE buffer = data;
     DMUS_DOWNLOADINFO *info = (DMUS_DOWNLOADINFO*)buffer;
     ULONG *offsets = ((DMUS_OFFSETTABLE*)(buffer + sizeof(DMUS_DOWNLOADINFO)))->ulOffsetTable;
     LPBYTE object = buffer + sizeof(DMUS_DOWNLOADINFO) + info->dwNumOffsetTableEntries * sizeof(ULONG);
@@ -135,7 +135,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_Download(LPDIRECTMUSICSYNTH8 iface,
 
     /* FIXME: Currently we only dump data which is very useful to known how native dmusic behave and debug builtin dmusic */
 
-    if (!hDownload || !data || !free)
+    if (!hDownload || !free)
         return E_POINTER;
 
     if (TRACE_ON(dmsynth))




More information about the wine-cvs mailing list