mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Kernel: Use TRY() in sys$write()
This commit is contained in:
parent
17933b193a
commit
afc5bbd56b
1 changed files with 1 additions and 3 deletions
|
@ -62,9 +62,7 @@ KResultOr<FlatPtr> Process::do_write(FileDescription& description, const UserOrK
|
|||
size_t total_nwritten = 0;
|
||||
|
||||
if (description.should_append() && description.file().is_seekable()) {
|
||||
auto seek_result = description.seek(0, SEEK_END);
|
||||
if (seek_result.is_error())
|
||||
return seek_result.error();
|
||||
TRY(description.seek(0, SEEK_END));
|
||||
}
|
||||
|
||||
while (total_nwritten < data_size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue