1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 13:37:10 +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:
Timothy Flynn 2025-05-10 16:24:35 -04:00 committed by Tim Flynn
parent 24ac5e2eee
commit dceed08058
Notes: github-actions[bot] 2025-05-11 01:21:05 +00:00
7 changed files with 100 additions and 100 deletions

View file

@ -33,7 +33,7 @@ Directory::~Directory()
ErrorOr<void> Directory::chown(uid_t uid, gid_t gid)
{
if (m_directory_fd == -1)
return Error::from_syscall("fchown"sv, -EBADF);
return Error::from_syscall("fchown"sv, EBADF);
TRY(Core::System::fchown(m_directory_fd, uid, gid));
return {};
}