mciavi32: Removed duplicate strlen/NULL check (Coverity).
This commit is contained in:
parent
25bfe9df49
commit
961e88f756
|
@ -250,12 +250,10 @@ static DWORD MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags,
|
|||
* contains the hFile value ?
|
||||
*/
|
||||
dwRet = MCIERR_UNRECOGNIZED_COMMAND;
|
||||
} else if (strlenW(lpOpenParms->lpstrElementName) > 0) {
|
||||
} else if (lpOpenParms->lpstrElementName && lpOpenParms->lpstrElementName[0]) {
|
||||
/* FIXME : what should be done id wma->hFile is already != 0, or the driver is playin' */
|
||||
TRACE("MCI_OPEN_ELEMENT %s!\n", debugstr_w(lpOpenParms->lpstrElementName));
|
||||
|
||||
if (lpOpenParms->lpstrElementName && (strlenW(lpOpenParms->lpstrElementName) > 0))
|
||||
{
|
||||
wma->lpFileName = HeapAlloc(GetProcessHeap(), 0, (strlenW(lpOpenParms->lpstrElementName) + 1) * sizeof(WCHAR));
|
||||
strcpyW(wma->lpFileName, lpOpenParms->lpstrElementName);
|
||||
|
||||
|
@ -273,7 +271,6 @@ static DWORD MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags,
|
|||
else if (!MCIAVI_CreateWindow(wma, dwFlags, lpOpenParms))
|
||||
dwRet = MCIERR_CREATEWINDOW;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
FIXME("Don't record yet\n");
|
||||
dwRet = MCIERR_UNSUPPORTED_FUNCTION;
|
||||
|
|
Loading…
Reference in New Issue