dsound: DirectSoundDevice_RemoveBuffer() cannot fail.

Michael Stefaniuc mstefani at redhat.de
Tue Sep 25 16:25:45 CDT 2012


---
 dlls/dsound/dsound.c         |    7 +------
 dlls/dsound/dsound_private.h |    4 +---
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
index 666f29f..e5b0e3c 100644
--- a/dlls/dsound/dsound.c
+++ b/dlls/dsound/dsound.c
@@ -1080,12 +1080,9 @@ HRESULT DirectSoundDevice_AddBuffer(
  * Remove secondary buffer from buffer list.
  * Gets exclusive access to buffer for writing.
  */
-HRESULT DirectSoundDevice_RemoveBuffer(
-    DirectSoundDevice * device,
-    IDirectSoundBufferImpl * pDSB)
+void DirectSoundDevice_RemoveBuffer(DirectSoundDevice * device, IDirectSoundBufferImpl * pDSB)
 {
     int i;
-    HRESULT hr = DS_OK;
 
     TRACE("(%p, %p)\n", device, pDSB);
 
@@ -1108,6 +1105,4 @@ HRESULT DirectSoundDevice_RemoveBuffer(
     TRACE("buffer count is now %d\n", device->nrofbuffers);
 
     RtlReleaseResource(&(device->buffer_list_lock));
-
-    return hr;
 }
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index d5fb415..247f229 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -118,9 +118,7 @@ HRESULT DirectSoundDevice_Initialize(
 HRESULT DirectSoundDevice_AddBuffer(
     DirectSoundDevice * device,
     IDirectSoundBufferImpl * pDSB) DECLSPEC_HIDDEN;
-HRESULT DirectSoundDevice_RemoveBuffer(
-    DirectSoundDevice * device,
-    IDirectSoundBufferImpl * pDSB) DECLSPEC_HIDDEN;
+void DirectSoundDevice_RemoveBuffer(DirectSoundDevice * device, IDirectSoundBufferImpl * pDSB) DECLSPEC_HIDDEN;
 HRESULT DirectSoundDevice_CreateSoundBuffer(
     DirectSoundDevice * device,
     LPCDSBUFFERDESC dsbd,
-- 
1.7.6.5



More information about the wine-patches mailing list