mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
AK+LibCore: Avoid double-negation of syscall error values
This is a remnant from SerenityOS. Let's avoid confusion as to why we negate errno when we call Error::from_syscall just to negate it again when we store the error code.
This commit is contained in:
parent
24ac5e2eee
commit
dceed08058
Notes:
github-actions[bot]
2025-05-11 01:21:05 +00:00
Author: https://github.com/trflynn89
Commit: dceed08058
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4689
7 changed files with 100 additions and 100 deletions
|
@ -36,9 +36,9 @@ public:
|
|||
static Error from_windows_error();
|
||||
#endif
|
||||
|
||||
static Error from_syscall(StringView syscall_name, int rc)
|
||||
static Error from_syscall(StringView syscall_name, int code)
|
||||
{
|
||||
return Error(syscall_name, rc);
|
||||
return Error(syscall_name, code);
|
||||
}
|
||||
static Error from_string_view(StringView string_literal) { return Error(string_literal); }
|
||||
|
||||
|
@ -113,9 +113,9 @@ private:
|
|||
{
|
||||
}
|
||||
|
||||
Error(StringView syscall_name, int rc)
|
||||
Error(StringView syscall_name, int code)
|
||||
: m_string_literal(syscall_name)
|
||||
, m_code(-rc)
|
||||
, m_code(code)
|
||||
, m_kind(Kind::Syscall)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue