Kernel: Stop allowing implicit conversion from KResult to int

This patch removes KResult::operator int() and deals with the fallout.
This forces a lot of code to be more explicit in its handling of errors,
greatly improving readability.
This commit is contained in:
Andreas Kling 2021-08-14 15:15:11 +02:00
commit 7676edfb9b
Notes: sideshowbarker 2024-07-18 06:57:20 +09:00
14 changed files with 51 additions and 52 deletions

View file

@ -216,7 +216,7 @@ NEVER_INLINE void syscall_handler(TrapFrame* trap)
auto result = Syscall::handle(regs, function, arg1, arg2, arg3, arg4);
if (result.is_error()) {
regs.set_return_reg(result.error());
regs.set_return_reg(result.error().error());
} else {
regs.set_return_reg(result.value());
}