mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
Kernel: Use KResultOr::release_value in Process::create_kernel_thread
This should avoid an unneccessary reference bump.
This commit is contained in:
@@ -811,7 +811,7 @@ RefPtr<Thread> Process::create_kernel_thread(void (*entry)(void*), void* entry_d
|
||||
if (thread_or_error.is_error())
|
||||
return {};
|
||||
|
||||
auto& thread = thread_or_error.value();
|
||||
auto thread = thread_or_error.release_value();
|
||||
thread->set_name(name);
|
||||
thread->set_affinity(affinity);
|
||||
thread->set_priority(priority);
|
||||
|
||||
Reference in New Issue
Block a user