summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Inode.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-06 18:24:13 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-06 18:56:51 +0200
commit2065ced8f652794fbcf49fcd0608df781417bf76 (patch)
tree411547d545fdd811207260ee17f891459dc82e9a /Kernel/FileSystem/Inode.cpp
parentb096e85777b2c9db5a45da63434b1cb5157a4606 (diff)
downloadserenity-2065ced8f652794fbcf49fcd0608df781417bf76.zip
Kernel: Make KBufferBuilder::append() & friends return KResult
This allows callers to react to a failed append (due to OOM.)
Diffstat (limited to 'Kernel/FileSystem/Inode.cpp')
-rw-r--r--Kernel/FileSystem/Inode.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp
index 7d3537d906..5d5b558a27 100644
--- a/Kernel/FileSystem/Inode.cpp
+++ b/Kernel/FileSystem/Inode.cpp
@@ -57,7 +57,7 @@ KResultOr<NonnullOwnPtr<KBuffer>> Inode::read_entire(FileDescription* descriptio
VERIFY(nread <= sizeof(buffer));
if (nread == 0)
break;
- builder.append((const char*)buffer, nread);
+ TRY(builder.append((const char*)buffer, nread));
offset += nread;
if (nread < sizeof(buffer))
break;