diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 20:24:38 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 20:24:38 +0200 |
commit | 704a2bfad5ba92725b3ed7b535753adc536666bd (patch) | |
tree | 1aba3fa473b7243c6e50e649ad6c2d909851c9f8 /Kernel | |
parent | 274d535d0e1710fe5819a7464b762c244bed664b (diff) | |
download | serenity-704a2bfad5ba92725b3ed7b535753adc536666bd.zip |
Kernel: Use TRY() in TmpFSInode::write_bytes()
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/FileSystem/TmpFS.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Kernel/FileSystem/TmpFS.cpp b/Kernel/FileSystem/TmpFS.cpp index d752d6c1e0..8d48ac82a8 100644 --- a/Kernel/FileSystem/TmpFS.cpp +++ b/Kernel/FileSystem/TmpFS.cpp @@ -149,9 +149,7 @@ KResultOr<size_t> TmpFSInode::write_bytes(off_t offset, size_t size, const UserO VERIFY(!is_directory()); VERIFY(offset >= 0); - auto result = prepare_to_write_data(); - if (result.is_error()) - return result; + TRY(prepare_to_write_data()); off_t old_size = m_metadata.size; off_t new_size = m_metadata.size; |