1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:57:34 +00:00

Kernel: Fix inverted logic in KResultOr

This silly inversion has survived so long because we don't exercise the
'unhappy paths' enough. :^)
This commit is contained in:
Ben Wiederhake 2021-01-16 12:33:54 +01:00 committed by Andreas Kling
parent 94bb544c33
commit 38c5b3f788

View file

@ -138,7 +138,7 @@ public:
return m_error; return m_error;
} }
KResult result() const { return m_is_error ? KSuccess : m_error; } KResult result() const { return m_is_error ? m_error : KSuccess; }
ALWAYS_INLINE T& value() ALWAYS_INLINE T& value()
{ {