mciwave: Remove redundant "not NULL" checks of the variables lpParms.

Michael Stefaniuc mstefani at redhat.de
Mon May 17 18:32:34 CDT 2010


Found by coccicheck.
---
 dlls/mciwave/mciwave.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/mciwave/mciwave.c b/dlls/mciwave/mciwave.c
index 87dc260..6485288 100644
--- a/dlls/mciwave/mciwave.c
+++ b/dlls/mciwave/mciwave.c
@@ -791,12 +791,12 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt,
     }
 
     end = wmw->ckWaveData.cksize;
-    if (lpParms && (dwFlags & MCI_TO)) {
+    if (dwFlags & MCI_TO) {
 	DWORD position = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwTo);
 	if (position > end)		return MCIERR_OUTOFRANGE;
 	end = position;
     }
-    if (lpParms && (dwFlags & MCI_FROM)) {
+    if (dwFlags & MCI_FROM) {
 	DWORD position = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwFrom);
 	if (position > end)		return MCIERR_OUTOFRANGE;
 	/* Seek rounds down, so do we. */
@@ -1033,10 +1033,10 @@ static DWORD WAVE_mciRecord(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt
     dwRet = WAVE_mciCreateRIFFSkeleton(wmw);
     if (dwRet != 0) return dwRet;
 
-    if (lpParms && (dwFlags & MCI_TO)) {
+    if (dwFlags & MCI_TO) {
 	end = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwTo);
     } else end = 0xFFFFFFFF;
-    if (lpParms && (dwFlags & MCI_FROM)) {
+    if (dwFlags & MCI_FROM) {
 	DWORD position = WAVE_ConvertTimeFormatToByte(wmw, lpParms->dwFrom);
 	if (wmw->ckWaveData.cksize < position)	return MCIERR_OUTOFRANGE;
 	/* Seek rounds down, so do we. */
-- 
1.7.1



More information about the wine-patches mailing list