diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-06 12:58:03 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-06 13:06:05 +0200 |
commit | 6e3381ac32e5d251c124cc6147c4598dd2bac505 (patch) | |
tree | 108e6a04d89d5f9c483df0361079caea2424362c /Kernel/Memory/PrivateInodeVMObject.cpp | |
parent | e3a716ceffc0fc1f5c4f2ee35dee02e987731621 (diff) | |
download | serenity-6e3381ac32e5d251c124cc6147c4598dd2bac505.zip |
Kernel: Use KResultOr and TRY() for {Shared,Private}InodeVMObject
Diffstat (limited to 'Kernel/Memory/PrivateInodeVMObject.cpp')
-rw-r--r-- | Kernel/Memory/PrivateInodeVMObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Memory/PrivateInodeVMObject.cpp b/Kernel/Memory/PrivateInodeVMObject.cpp index 0c3aa9f981..25b1b6cbad 100644 --- a/Kernel/Memory/PrivateInodeVMObject.cpp +++ b/Kernel/Memory/PrivateInodeVMObject.cpp @@ -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() |