diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-01-16 12:33:54 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-16 12:53:23 +0100 |
commit | 38c5b3f78814fa7883f4569125acc751c53d2f80 (patch) | |
tree | 49b9be84a4628fc2228ea648853e93b0fd74b76d | |
parent | 94bb544c33ad0e9bec6e69c5b86e0e80bf81eadc (diff) | |
download | serenity-38c5b3f78814fa7883f4569125acc751c53d2f80.zip |
Kernel: Fix inverted logic in KResultOr
This silly inversion has survived so long because we don't exercise the
'unhappy paths' enough. :^)
-rw-r--r-- | Kernel/KResult.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/KResult.h b/Kernel/KResult.h index a261f14893..2629b25551 100644 --- a/Kernel/KResult.h +++ b/Kernel/KResult.h @@ -138,7 +138,7 @@ public: 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() { |