From: Benjamin Peterson Date: Mon, 19 Jan 2009 15:51:27 +0000 (+0000) Subject: simplify code X-Git-Tag: v2.7a1~2249 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=943a6ddc72e1e23de87ca73f75a0ce31fe55924b;p=thirdparty%2FPython%2Fcpython.git simplify code --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 915d30d3dfb7..cda8135c4868 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; }