Robert Reif : dsound: Remove NULL This pointer checks.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Apr 8 13:12:25 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 208b0c2e72741cf314396bac947431ea131ff7b1
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=208b0c2e72741cf314396bac947431ea131ff7b1

Author: Robert Reif <reif at earthlink.net>
Date:   Sat Apr  8 09:16:29 2006 -0400

dsound: Remove NULL This pointer checks.

---

 dlls/dsound/capture.c |   45 ---------------------------------------------
 1 files changed, 0 insertions(+), 45 deletions(-)

diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c
index 969a079..7ab1422 100644
--- a/dlls/dsound/capture.c
+++ b/dlls/dsound/capture.c
@@ -458,11 +458,6 @@ HRESULT WINAPI IDirectSoundCaptureImpl_C
 
     TRACE( "(%p,%p,%p,%p)\n",iface,lpcDSCBufferDesc,lplpDSCaptureBuffer,pUnk);
 
-    if (This == NULL) {
-	WARN("invalid parameter: This == NULL\n");
-	return DSERR_INVALIDPARAM;
-    }
-
     if (lpcDSCBufferDesc == NULL) {
 	WARN("invalid parameter: lpcDSCBufferDesc == NULL)\n");
 	return DSERR_INVALIDPARAM;
@@ -813,11 +808,6 @@ IDirectSoundCaptureBufferImpl_GetCaps(
     IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
     TRACE( "(%p,%p)\n", This, lpDSCBCaps );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (lpDSCBCaps == NULL) {
         WARN("invalid parameter: lpDSCBCaps == NULL\n");
         return DSERR_INVALIDPARAM;
@@ -853,11 +843,6 @@ IDirectSoundCaptureBufferImpl_GetCurrent
     HRESULT hres = DS_OK;
     TRACE( "(%p,%p,%p)\n", This, lpdwCapturePosition, lpdwReadPosition );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (This->device == NULL) {
         WARN("invalid parameter: This->device == NULL\n");
         return DSERR_INVALIDPARAM;
@@ -913,11 +898,6 @@ IDirectSoundCaptureBufferImpl_GetFormat(
     TRACE( "(%p,%p,0x%08lx,%p)\n", This, lpwfxFormat, dwSizeAllocated,
         lpdwSizeWritten );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (This->device == NULL) {
         WARN("invalid parameter: This->device == NULL\n");
         return DSERR_INVALIDPARAM;
@@ -951,11 +931,6 @@ IDirectSoundCaptureBufferImpl_GetStatus(
     IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
     TRACE( "(%p, %p), thread is %04lx\n", This, lpdwStatus, GetCurrentThreadId() );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (This->device == NULL) {
         WARN("invalid parameter: This->device == NULL\n");
         return DSERR_INVALIDPARAM;
@@ -1016,11 +991,6 @@ IDirectSoundCaptureBufferImpl_Lock(
         dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2,
         lpdwAudioBytes2, dwFlags, GetTickCount() );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (This->device == NULL) {
         WARN("invalid parameter: This->device == NULL\n");
         return DSERR_INVALIDPARAM;
@@ -1080,11 +1050,6 @@ IDirectSoundCaptureBufferImpl_Start(
     IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
     TRACE( "(%p,0x%08lx)\n", This, dwFlags );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (This->device == NULL) {
         WARN("invalid parameter: This->device == NULL\n");
         return DSERR_INVALIDPARAM;
@@ -1237,11 +1202,6 @@ IDirectSoundCaptureBufferImpl_Stop( LPDI
     IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
     TRACE( "(%p)\n", This );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (This->device == NULL) {
         WARN("invalid parameter: This->device == NULL\n");
         return DSERR_INVALIDPARAM;
@@ -1288,11 +1248,6 @@ IDirectSoundCaptureBufferImpl_Unlock(
     TRACE( "(%p,%p,%08lu,%p,%08lu)\n", This, lpvAudioPtr1, dwAudioBytes1,
         lpvAudioPtr2, dwAudioBytes2 );
 
-    if (This == NULL) {
-        WARN("invalid parameter: This == NULL\n");
-        return DSERR_INVALIDPARAM;
-    }
-
     if (lpvAudioPtr1 == NULL) {
         WARN("invalid parameter: lpvAudioPtr1 == NULL\n");
         return DSERR_INVALIDPARAM;




More information about the wine-cvs mailing list