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

Found by coccicheck.
This commit is contained in:
Michael Stefaniuc 2010-05-18 01:32:34 +02:00 committed by Alexandre Julliard
parent 6178e86a74
commit 2721cff09e
1 changed files with 4 additions and 4 deletions

View File

@ -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. */