mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:58:12 +00:00
Kernel: Use KResultOr and TRY() for {Shared,Private}InodeVMObject
This commit is contained in:
parent
e3a716ceff
commit
6e3381ac32
8 changed files with 14 additions and 31 deletions
|
@ -9,9 +9,9 @@
|
|||
|
||||
namespace Kernel::Memory {
|
||||
|
||||
RefPtr<PrivateInodeVMObject> PrivateInodeVMObject::try_create_with_inode(Inode& inode)
|
||||
KResultOr<NonnullRefPtr<PrivateInodeVMObject>> PrivateInodeVMObject::try_create_with_inode(Inode& inode)
|
||||
{
|
||||
return adopt_ref_if_nonnull(new (nothrow) PrivateInodeVMObject(inode, inode.size()));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) PrivateInodeVMObject(inode, inode.size()));
|
||||
}
|
||||
|
||||
KResultOr<NonnullRefPtr<VMObject>> PrivateInodeVMObject::try_clone()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue