mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
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:
parent
d30d776ca4
commit
7676edfb9b
Notes:
sideshowbarker
2024-07-18 06:57:20 +09:00
Author: https://github.com/awesomekling
Commit: 7676edfb9b
14 changed files with 51 additions and 52 deletions
|
@ -84,9 +84,9 @@ KResultOr<FlatPtr> Process::sys$close(int fd)
|
|||
dbgln_if(IO_DEBUG, "sys$close({}) {}", fd, description.ptr());
|
||||
if (!description)
|
||||
return EBADF;
|
||||
int rc = description->close();
|
||||
auto result = description->close();
|
||||
m_fds[fd] = {};
|
||||
return rc;
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue