mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09: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
|
@ -120,7 +120,7 @@ ErrorOr<NonnullOwnPtr<LocalSocket>> LocalServer::accept()
|
|||
int accepted_fd = ::accept(m_fd, (sockaddr*)&un, &un_size);
|
||||
#endif
|
||||
if (accepted_fd < 0) {
|
||||
return Error::from_syscall("accept"sv, -errno);
|
||||
return Error::from_syscall("accept"sv, errno);
|
||||
}
|
||||
|
||||
#if defined(AK_OS_MACOS) || defined(AK_OS_IOS) || defined(AK_OS_HAIKU)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue