Commit 72344795 authored by Victor Stinner's avatar Victor Stinner

Issue #9611: remove useless and dangerous explicit conversion to size_t

parent 51e2107b
...@@ -530,7 +530,7 @@ fileio_readinto(fileio *self, PyObject *args) ...@@ -530,7 +530,7 @@ fileio_readinto(fileio *self, PyObject *args)
len = INT_MAX; len = INT_MAX;
n = read(self->fd, pbuf.buf, (int)len); n = read(self->fd, pbuf.buf, (int)len);
#else #else
n = read(self->fd, pbuf.buf, (size_t)len); n = read(self->fd, pbuf.buf, len);
#endif #endif
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
} else } else
...@@ -716,7 +716,7 @@ fileio_write(fileio *self, PyObject *args) ...@@ -716,7 +716,7 @@ fileio_write(fileio *self, PyObject *args)
len = INT_MAX; len = INT_MAX;
n = write(self->fd, pbuf.buf, (int)len); n = write(self->fd, pbuf.buf, (int)len);
#else #else
n = write(self->fd, pbuf.buf, (size_t)len); n = write(self->fd, pbuf.buf, len);
#endif #endif
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
} else } else
......
...@@ -5712,7 +5712,7 @@ posix_write(PyObject *self, PyObject *args) ...@@ -5712,7 +5712,7 @@ posix_write(PyObject *self, PyObject *args)
len = INT_MAX; len = INT_MAX;
size = write(fd, pbuf.buf, (int)len); size = write(fd, pbuf.buf, (int)len);
#else #else
size = write(fd, pbuf.buf, (size_t)len); size = write(fd, pbuf.buf, len);
#endif #endif
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
PyBuffer_Release(&pbuf); PyBuffer_Release(&pbuf);
......
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