Commit 208b0c2e authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

dsound: Remove NULL This pointer checks.

parent 2c4c2043
...@@ -458,11 +458,6 @@ HRESULT WINAPI IDirectSoundCaptureImpl_CreateCaptureBuffer( ...@@ -458,11 +458,6 @@ HRESULT WINAPI IDirectSoundCaptureImpl_CreateCaptureBuffer(
TRACE( "(%p,%p,%p,%p)\n",iface,lpcDSCBufferDesc,lplpDSCaptureBuffer,pUnk); 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) { if (lpcDSCBufferDesc == NULL) {
WARN("invalid parameter: lpcDSCBufferDesc == NULL)\n"); WARN("invalid parameter: lpcDSCBufferDesc == NULL)\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -813,11 +808,6 @@ IDirectSoundCaptureBufferImpl_GetCaps( ...@@ -813,11 +808,6 @@ IDirectSoundCaptureBufferImpl_GetCaps(
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p,%p)\n", This, lpDSCBCaps ); TRACE( "(%p,%p)\n", This, lpDSCBCaps );
if (This == NULL) {
WARN("invalid parameter: This == NULL\n");
return DSERR_INVALIDPARAM;
}
if (lpDSCBCaps == NULL) { if (lpDSCBCaps == NULL) {
WARN("invalid parameter: lpDSCBCaps == NULL\n"); WARN("invalid parameter: lpDSCBCaps == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -853,11 +843,6 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition( ...@@ -853,11 +843,6 @@ IDirectSoundCaptureBufferImpl_GetCurrentPosition(
HRESULT hres = DS_OK; HRESULT hres = DS_OK;
TRACE( "(%p,%p,%p)\n", This, lpdwCapturePosition, lpdwReadPosition ); TRACE( "(%p,%p,%p)\n", This, lpdwCapturePosition, lpdwReadPosition );
if (This == NULL) {
WARN("invalid parameter: This == NULL\n");
return DSERR_INVALIDPARAM;
}
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -913,11 +898,6 @@ IDirectSoundCaptureBufferImpl_GetFormat( ...@@ -913,11 +898,6 @@ IDirectSoundCaptureBufferImpl_GetFormat(
TRACE( "(%p,%p,0x%08lx,%p)\n", This, lpwfxFormat, dwSizeAllocated, TRACE( "(%p,%p,0x%08lx,%p)\n", This, lpwfxFormat, dwSizeAllocated,
lpdwSizeWritten ); lpdwSizeWritten );
if (This == NULL) {
WARN("invalid parameter: This == NULL\n");
return DSERR_INVALIDPARAM;
}
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -951,11 +931,6 @@ IDirectSoundCaptureBufferImpl_GetStatus( ...@@ -951,11 +931,6 @@ IDirectSoundCaptureBufferImpl_GetStatus(
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p, %p), thread is %04lx\n", This, lpdwStatus, GetCurrentThreadId() ); 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) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -1016,11 +991,6 @@ IDirectSoundCaptureBufferImpl_Lock( ...@@ -1016,11 +991,6 @@ IDirectSoundCaptureBufferImpl_Lock(
dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2, dwReadBytes, lplpvAudioPtr1, lpdwAudioBytes1, lplpvAudioPtr2,
lpdwAudioBytes2, dwFlags, GetTickCount() ); lpdwAudioBytes2, dwFlags, GetTickCount() );
if (This == NULL) {
WARN("invalid parameter: This == NULL\n");
return DSERR_INVALIDPARAM;
}
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -1080,11 +1050,6 @@ IDirectSoundCaptureBufferImpl_Start( ...@@ -1080,11 +1050,6 @@ IDirectSoundCaptureBufferImpl_Start(
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p,0x%08lx)\n", This, dwFlags ); TRACE( "(%p,0x%08lx)\n", This, dwFlags );
if (This == NULL) {
WARN("invalid parameter: This == NULL\n");
return DSERR_INVALIDPARAM;
}
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -1237,11 +1202,6 @@ IDirectSoundCaptureBufferImpl_Stop( LPDIRECTSOUNDCAPTUREBUFFER8 iface ) ...@@ -1237,11 +1202,6 @@ IDirectSoundCaptureBufferImpl_Stop( LPDIRECTSOUNDCAPTUREBUFFER8 iface )
IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface; IDirectSoundCaptureBufferImpl *This = (IDirectSoundCaptureBufferImpl *)iface;
TRACE( "(%p)\n", This ); TRACE( "(%p)\n", This );
if (This == NULL) {
WARN("invalid parameter: This == NULL\n");
return DSERR_INVALIDPARAM;
}
if (This->device == NULL) { if (This->device == NULL) {
WARN("invalid parameter: This->device == NULL\n"); WARN("invalid parameter: This->device == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
...@@ -1288,11 +1248,6 @@ IDirectSoundCaptureBufferImpl_Unlock( ...@@ -1288,11 +1248,6 @@ IDirectSoundCaptureBufferImpl_Unlock(
TRACE( "(%p,%p,%08lu,%p,%08lu)\n", This, lpvAudioPtr1, dwAudioBytes1, TRACE( "(%p,%p,%08lu,%p,%08lu)\n", This, lpvAudioPtr1, dwAudioBytes1,
lpvAudioPtr2, dwAudioBytes2 ); lpvAudioPtr2, dwAudioBytes2 );
if (This == NULL) {
WARN("invalid parameter: This == NULL\n");
return DSERR_INVALIDPARAM;
}
if (lpvAudioPtr1 == NULL) { if (lpvAudioPtr1 == NULL) {
WARN("invalid parameter: lpvAudioPtr1 == NULL\n"); WARN("invalid parameter: lpvAudioPtr1 == NULL\n");
return DSERR_INVALIDPARAM; return DSERR_INVALIDPARAM;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment