diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 915d30d3dfb..cda8135c486 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -6632,10 +6632,8 @@ posix_ftruncate(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS res = ftruncate(fd, length); Py_END_ALLOW_THREADS - if (res < 0) { - posix_error(); - return NULL; - } + if (res < 0) + return posix_error(); Py_INCREF(Py_None); return Py_None; }