mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-23 09:48:56 +00:00
LibCore/MappedFile: Remove unnecessary fcntl call
This commit is contained in:
parent
3f7affa825
commit
153dc6686c
Notes:
github-actions[bot]
2024-11-26 09:01:15 +00:00
Author: https://github.com/stasoid
Commit: 153dc6686c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2353
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 0 additions and 2 deletions
|
@ -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)
|
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] {
|
ScopeGuard fd_close_guard = [fd] {
|
||||||
::close(fd);
|
::close(fd);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue