Merge "Improve codegen slightly when doing FD validity checks"

am: 9ad079ba58

Change-Id: I4262f086b9041bb28536cf2c7598817fac63b8cc
This commit is contained in:
Daniel Colascione 2019-09-04 18:20:24 -07:00 committed by android-build-merger
commit 2378575dac

View file

@ -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);