From 943a6ddc72e1e23de87ca73f75a0ce31fe55924b Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Mon, 19 Jan 2009 15:51:27 +0000 Subject: [PATCH] simplify code --- Modules/posixmodule.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; }