diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-17 15:44:58 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-18 21:11:30 +0100 |
commit | 0f22ba5bf2a1393ac011ad4d09aa0cefce946be9 (patch) | |
tree | efdfeaff596a29e0614739772f37a02b1661172c /Kernel | |
parent | b285323d91819f67677552701bb4b853859267bd (diff) | |
download | serenity-0f22ba5bf2a1393ac011ad4d09aa0cefce946be9.zip |
AK: Make RedBlackTree::try_insert() return ErrorOr<void> instead of bool
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Memory/AddressSpace.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Kernel/Memory/AddressSpace.cpp b/Kernel/Memory/AddressSpace.cpp index 6f3e54d313..d936be2b40 100644 --- a/Kernel/Memory/AddressSpace.cpp +++ b/Kernel/Memory/AddressSpace.cpp @@ -267,8 +267,7 @@ ErrorOr<Region*> AddressSpace::add_region(NonnullOwnPtr<Region> region) { auto* ptr = region.ptr(); SpinlockLocker lock(m_lock); - if (!m_regions.try_insert(region->vaddr().get(), move(region))) - return ENOMEM; + TRY(m_regions.try_insert(region->vaddr().get(), move(region))); return ptr; } |