Commit 2721cff0 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

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

Found by coccicheck.
parent 6178e86a
......@@ -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. */
......
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