diff options
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r-- | applypatch/applypatch.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp index f9383ddeb..90d8e8604 100644 --- a/applypatch/applypatch.cpp +++ b/applypatch/applypatch.cpp @@ -76,7 +76,7 @@ static bool ReadPartitionToBuffer(const Partition& partition, FileContents* out, } android::base::unique_fd dev(open(partition.name.c_str(), O_RDONLY)); - if (!dev) { + if (dev == -1) { PLOG(ERROR) << "Failed to open eMMC partition \"" << partition << "\""; } else { std::vector<unsigned char> buffer(partition.size); |