mcicda: Compare a file handle with INVALID_HANDLE_VALUE instead of NULL.

Found by Smatch.
This commit is contained in:
Michael Stefaniuc 2009-02-27 23:55:31 +01:00 committed by Alexandre Julliard
parent 0d7bec3578
commit 4362e840d0
1 changed files with 1 additions and 1 deletions

View File

@ -463,7 +463,7 @@ static DWORD MCICDA_Open(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSW lpOpenPar
/* now, open the handle */
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);
if (wmcda->handle != 0)
if (wmcda->handle != INVALID_HANDLE_VALUE)
return 0;
the_error: