diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-03-29 04:52:46 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-03-29 04:52:46 +0100 |
commit | a0fe1227b834410c8ae12159bceaaa7e76bec308 (patch) | |
tree | 385629afcd38f624cd8af6c2741aba0e9756b704 /applypatch | |
parent | Merge "Remove the extern declaration of `sehandle` from roots.cpp." (diff) | |
parent | Fix bogus error checking on unique_fd (diff) | |
download | android_bootable_recovery-a0fe1227b834410c8ae12159bceaaa7e76bec308.tar android_bootable_recovery-a0fe1227b834410c8ae12159bceaaa7e76bec308.tar.gz android_bootable_recovery-a0fe1227b834410c8ae12159bceaaa7e76bec308.tar.bz2 android_bootable_recovery-a0fe1227b834410c8ae12159bceaaa7e76bec308.tar.lz android_bootable_recovery-a0fe1227b834410c8ae12159bceaaa7e76bec308.tar.xz android_bootable_recovery-a0fe1227b834410c8ae12159bceaaa7e76bec308.tar.zst android_bootable_recovery-a0fe1227b834410c8ae12159bceaaa7e76bec308.zip |
Diffstat (limited to 'applypatch')
-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); |