mcicda: Compare a file handle with INVALID_HANDLE_VALUE instead of NULL.
Found by Smatch.
This commit is contained in:
parent
0d7bec3578
commit
4362e840d0
|
@ -463,7 +463,7 @@ static DWORD MCICDA_Open(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpOpenPar
|
||||||
/* now, open the handle */
|
/* now, open the handle */
|
||||||
root[0] = root[1] = '\\'; root[2] = '.'; root[3] = '\\'; root[4] = drive; root[5] = ':'; root[6] = '\0';
|
root[0] = root[1] = '\\'; root[2] = '.'; root[3] = '\\'; root[4] = drive; root[5] = ':'; root[6] = '\0';
|
||||||
wmcda->handle = CreateFileW(root, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
|
wmcda->handle = CreateFileW(root, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0);
|
||||||
if (wmcda->handle != 0)
|
if (wmcda->handle != INVALID_HANDLE_VALUE)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
the_error:
|
the_error:
|
||||||
|
|
Loading…
Reference in New Issue