diff --git a/Kernel/Library/ThreadSafeRefCounted.h b/Kernel/Library/ThreadSafeRefCounted.h index 93d23a4dca..cc7e1caf35 100644 --- a/Kernel/Library/ThreadSafeRefCounted.h +++ b/Kernel/Library/ThreadSafeRefCounted.h @@ -100,9 +100,9 @@ public: call_will_be_destroyed_if_present(static_cast(this)); delete static_cast(this); return true; - } else if (new_ref_count == 1) { - call_one_ref_left_if_present(static_cast(this)); } + if (new_ref_count == 1) + call_one_ref_left_if_present(static_cast(this)); return false; } }; diff --git a/Kernel/Process.h b/Kernel/Process.h index 634c36d628..e37475a399 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -577,10 +577,9 @@ private: { if (g_profiling_all_threads) return g_global_perf_events; - else if (m_profiling) + if (m_profiling) return m_perf_event_buffer.ptr(); - else - return nullptr; + return nullptr; } mutable IntrusiveListNode m_list_node;