diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-06-25 23:13:47 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-06-25 23:13:47 +0200 |
commit | f8c73577832c71e8483f29cd4d4c8d07958585dd (patch) | |
tree | 4b3140cb9990f1f7c53c82780347c949a4149cfc /Modules/posixmodule.c | |
parent | 628d372ff0ab61e2fc0be54af1cee0b38fc9a743 (diff) | |
download | cpython-f8c73577832c71e8483f29cd4d4c8d07958585dd.tar.gz |
Fix os.confstr(): the result type of the C function is size_t, not int
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index fd4628c763..226a4d510b 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -9140,7 +9140,7 @@ posix_confstr(PyObject *self, PyObject *args) PyObject *result = NULL; int name; char buffer[255]; - int len; + size_t len; if (!PyArg_ParseTuple(args, "O&:confstr", conv_confstr_confname, &name)) return NULL; @@ -9157,7 +9157,7 @@ posix_confstr(PyObject *self, PyObject *args) } } - if ((unsigned int)len >= sizeof(buffer)) { + if (len >= sizeof(buffer)) { char *buf = PyMem_Malloc(len); if (buf == NULL) return PyErr_NoMemory(); |