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
|
||||
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…
Reference in New Issue