winecfg: Pass HEAP_ZERO_MEMORY to HeapAlloc() instead of clearing the memory with a separate memset() call.

Michael Stefaniuc mstefani at redhat.de
Thu Dec 6 18:14:13 CST 2007


---
 programs/winecfg/audio.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index 39b3b07..32d8754 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
@@ -541,10 +541,8 @@ static void findAudioDrivers(void)
     if (numFound) {
         loadedAudioDrv = HeapReAlloc(GetProcessHeap(), 0, loadedAudioDrv, (numFound + 1) * sizeof(AUDIO_DRIVER));
         CopyMemory(&loadedAudioDrv[numFound], pAudioDrv, sizeof(AUDIO_DRIVER));
-    } else {
-        loadedAudioDrv = HeapAlloc(GetProcessHeap(), 0, sizeof(AUDIO_DRIVER));
-        ZeroMemory(&loadedAudioDrv[0], sizeof(AUDIO_DRIVER));
-    }
+    } else
+        loadedAudioDrv = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(AUDIO_DRIVER));
 }
 
 /* check local copy of registry string for unloadable drivers */
-- 
1.5.3.7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071207/8dd1f9a4/attachment.pgp 


More information about the wine-patches mailing list