mirror of https://github.com/python/cpython
simplify code
This commit is contained in:
parent
596d306950
commit
943a6ddc72
|
@ -6632,10 +6632,8 @@ posix_ftruncate(PyObject *self, PyObject *args)
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
res = ftruncate(fd, length);
|
res = ftruncate(fd, length);
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
if (res < 0) {
|
if (res < 0)
|
||||||
posix_error();
|
return posix_error();
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue