summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index e2ed5f9..c5ba4b7 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -1325,11 +1325,13 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict)
*/
if (fileno != -1 && fileno != 0) {
/* Ensure that fileno is within the CRT's valid range */
- if (_PyVerify_fd(fileno) == 0) {
+ if (!_PyVerify_fd(fileno)) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;
}
+ _Py_BEGIN_SUPPRESS_IPH
fh = (HANDLE)_get_osfhandle(fileno);
+ _Py_END_SUPPRESS_IPH
if (fh==(HANDLE)-1) {
PyErr_SetFromErrno(PyExc_OSError);
return NULL;