summaryrefslogtreecommitdiff
path: root/patchoat/patchoat.cc
diff options
context:
space:
mode:
Diffstat (limited to 'patchoat/patchoat.cc')
-rw-r--r--patchoat/patchoat.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index f3eb663cb8..c79bf92866 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -442,7 +442,7 @@ PatchOat::MaybePic PatchOat::IsOatPic(const ElfFile* oat_in) {
return ERROR_OAT_FILE;
}
- const std::string& file_path = oat_in->GetFile().GetPath();
+ const std::string& file_path = oat_in->GetFilePath();
const OatHeader* oat_header = GetOatHeader(oat_in);
if (oat_header == nullptr) {
@@ -846,7 +846,7 @@ bool PatchOat::PatchOatHeader(ElfFileImpl* oat_file) {
}
OatHeader* oat_header = reinterpret_cast<OatHeader*>(oat_file->Begin() + rodata_sec->sh_offset);
if (!oat_header->IsValid()) {
- LOG(ERROR) << "Elf file " << oat_file->GetFile().GetPath() << " has an invalid oat header";
+ LOG(ERROR) << "Elf file " << oat_file->GetFilePath() << " has an invalid oat header";
return false;
}
oat_header->RelocateOat(delta_);
@@ -854,10 +854,11 @@ bool PatchOat::PatchOatHeader(ElfFileImpl* oat_file) {
}
bool PatchOat::PatchElf() {
- if (oat_file_->Is64Bit())
+ if (oat_file_->Is64Bit()) {
return PatchElf<ElfFileImpl64>(oat_file_->GetImpl64());
- else
+ } else {
return PatchElf<ElfFileImpl32>(oat_file_->GetImpl32());
+ }
}
template <typename ElfFileImpl>