Bug #21396: Wrong error number generated for a missing table

parent 438b94e2
44d03f27qNdqJmARzBoP3Is_cN5e0w
......@@ -335,7 +335,7 @@ File my_sopen(const char *path, int oflag, int shflag, int pmode)
* try to open/create the file
*/
if ((osfh= CreateFile(path, fileaccess, fileshare, &SecurityAttributes,
filecreate, fileattrib, NULL)) == (HANDLE)0xffffffff)
filecreate, fileattrib, NULL)) == INVALID_HANDLE_VALUE)
{
/*
* OS call to open/create file failed! map the error, release
......@@ -346,7 +346,7 @@ File my_sopen(const char *path, int oflag, int shflag, int pmode)
return -1; /* return error to caller */
}
fh= _open_osfhandle((long)osfh, oflag & (_O_APPEND | _O_RDONLY | _O_TEXT));
fh= _open_osfhandle((intptr_t)osfh, oflag & (_O_APPEND | _O_RDONLY | _O_TEXT));
return fh; /* return handle */
}
......
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