Merge "Improve codegen slightly when doing FD validity checks"
am: 9ad079ba58
Change-Id: I4262f086b9041bb28536cf2c7598817fac63b8cc
This commit is contained in:
commit
2378575dac
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ class unique_fd_impl final {
|
|||
// Catch bogus error checks (i.e.: "!fd" instead of "fd != -1").
|
||||
bool operator!() const = delete;
|
||||
|
||||
bool ok() const { return get() != -1; }
|
||||
bool ok() const { return get() >= 0; }
|
||||
|
||||
int release() __attribute__((warn_unused_result)) {
|
||||
tag(fd_, this, nullptr);
|
||||
|
|
Loading…
Reference in a new issue