LibCore/MappedFile: Remove unnecessary fcntl call

This commit is contained in:
stasoid 2024-11-14 18:20:38 +05:00
parent 91fbb26c03
commit 4fb15d25f3

View file

@ -29,8 +29,6 @@ ErrorOr<NonnullOwnPtr<MappedFile>> MappedFile::map_from_file(NonnullOwnPtr<Core:
ErrorOr<NonnullOwnPtr<MappedFile>> MappedFile::map_from_fd_and_close(int fd, [[maybe_unused]] StringView path, Mode mode)
{
TRY(Core::System::fcntl(fd, F_SETFD, FD_CLOEXEC));
ScopeGuard fd_close_guard = [fd] {
::close(fd);
};