Kernel: Use TRY() in sys$write()
This commit is contained in:
parent
17933b193a
commit
afc5bbd56b
Notes:
sideshowbarker
2024-07-18 04:41:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/afc5bbd56ba
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
Reference in a new issue