google / google/leveldb

`PosixRandomAccessFile` close `fd` which is `-1`

Open
#1,055 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
39.4k
Forks
8.2k
PR merge metrics
No merged PRs in 30d

Description

Hello:
I've a question why reading source code:

code: https://github.com/google/leveldb/blob/main/util/env_posix.cc#L186

I wonder why `::close(fd)` is required even we are sure `fd == -1`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.