mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 20:29:42 +00:00
Kernel: Make KBufferBuilder::append() & friends return KResult
This allows callers to react to a failed append (due to OOM.)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user