summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-01-19 15:51:27 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-01-19 15:51:27 (GMT)
commit943a6ddc72e1e23de87ca73f75a0ce31fe55924b (patch)
tree9c3bd964f497fb163312c9465c4778abb6a51b1c /Modules/posixmodule.c
parent596d30695082ee9798f3ad9974b306687cd757bd (diff)
downloadcpython-943a6ddc72e1e23de87ca73f75a0ce31fe55924b.zip
cpython-943a6ddc72e1e23de87ca73f75a0ce31fe55924b.tar.gz
cpython-943a6ddc72e1e23de87ca73f75a0ce31fe55924b.tar.bz2
simplify code
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 915d30d..cda8135 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;
}