summaryrefslogtreecommitdiffstats
path: root/Modules/fcntlmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-08-17 20:20:00 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2014-08-17 20:20:00 (GMT)
commit049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb (patch)
tree96885f696a33000548163e8b4bab6415dd842dde /Modules/fcntlmodule.c
parentdaca3d7e9b48badf02521df1b729ddd2733b2d77 (diff)
downloadcpython-049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb.zip
cpython-049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb.tar.gz
cpython-049e509a9f87d1f82ae0ebfe21c226f37ce9fbdb.tar.bz2
Issue #22207: Fix "comparison between signed and unsigned integers" warning in
test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.
Diffstat (limited to 'Modules/fcntlmodule.c')
-rw-r--r--Modules/fcntlmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index cf0ac19..56e4021 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -42,7 +42,7 @@ fcntl_fcntl(PyObject *self, PyObject *args)
if (PyArg_ParseTuple(args, "O&is#:fcntl",
conv_descriptor, &fd, &code, &str, &len)) {
- if (len > sizeof buf) {
+ if ((size_t)len > sizeof buf) {
PyErr_SetString(PyExc_ValueError,
"fcntl string arg too long");
return NULL;