mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
simplify code
This commit is contained in:
parent
596d306950
commit
943a6ddc72
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue