Maarten Lankhorst : dsound: Remove a few null initializations in DirectSoundDevice_Create.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 11:28:07 CDT 2007


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

Author: Maarten Lankhorst <maarten at codeweavers.com>
Date:   Thu Oct 11 22:08:17 2007 +0200

dsound: Remove a few null initializations in DirectSoundDevice_Create.

The memory is allocated with HEAP_ZERO_MEMORY.

---

 dlls/dsound/dsound.c |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 7d6dc93..ed6c221 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -1166,23 +1166,11 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
     }
 
     device->ref            = 1;
-    device->driver         = NULL;
     device->priolevel      = DSSCL_NORMAL;
-    device->fraglen        = 0;
-    device->hwbuf          = NULL;
-    device->buffer         = NULL;
-    device->buflen         = 0;
-    device->writelead      = 0;
     device->state          = STATE_STOPPED;
-    device->nrofbuffers    = 0;
-    device->buffers        = NULL;
-    device->primary        = NULL;
     device->speaker_config = DSSPEAKER_STEREO | (DSSPEAKER_GEOMETRY_NARROW << 16);
-    device->tmp_buffer     = NULL;
-    device->tmp_buffer_len = 0;
 
     /* 3D listener initial parameters */
-    device->listener       = NULL;
     device->ds3dl.dwSize   = sizeof(DS3DLISTENER);
     device->ds3dl.vPosition.x = 0.0;
     device->ds3dl.vPosition.y = 0.0;
@@ -1200,8 +1188,8 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
     device->ds3dl.flRolloffFactor = DS3D_DEFAULTROLLOFFFACTOR;
     device->ds3dl.flDopplerFactor = DS3D_DEFAULTDOPPLERFACTOR;
 
-    device->prebuf         = ds_snd_queue_max;
-    device->guid           = GUID_NULL;
+    device->prebuf = ds_snd_queue_max;
+    device->guid = GUID_NULL;
 
     /* Set default wave format (may need it for waveOutOpen) */
     device->pwfx = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(WAVEFORMATEX));




More information about the wine-cvs mailing list