]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
simplify code
authorBenjamin Peterson <benjamin@python.org>
Mon, 19 Jan 2009 15:51:27 +0000 (15:51 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 19 Jan 2009 15:51:27 +0000 (15:51 +0000)
Modules/posixmodule.c

index 915d30d3dfb7826d6c252940a4df4a36afe2d5c2..cda8135c486858f48d0aa32a785672d20e1b4572 100644 (file)
@@ -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;
 }