mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
Kernel: Make UserOrKernelBuffer return KResult from read/write/memset
This allows us to simplify a whole bunch of call sites with TRY(). :^)
This commit is contained in:
@@ -446,10 +446,7 @@ KResultOr<size_t> ISO9660Inode::read_bytes(off_t offset, size_t size, UserOrKern
|
||||
return EIO;
|
||||
}
|
||||
|
||||
bool result = buffer_offset.write(block->data() + initial_offset, bytes_to_read);
|
||||
if (!result) {
|
||||
return EFAULT;
|
||||
}
|
||||
TRY(buffer_offset.write(block->data() + initial_offset, bytes_to_read));
|
||||
|
||||
nread += bytes_to_read;
|
||||
initial_offset = 0;
|
||||
|
||||
Reference in New Issue
Block a user