From 1d3d417c06b57580d163284b8cc7686e9d8c26ee Mon Sep 17 00:00:00 2001 From: Romain Thomas Date: Thu, 9 May 2024 20:59:12 +0200 Subject: [PATCH] Code lint --- src/ELF/Binary.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ELF/Binary.cpp b/src/ELF/Binary.cpp index f7d179d7d1..82545d5397 100644 --- a/src/ELF/Binary.cpp +++ b/src/ELF/Binary.cpp @@ -1650,7 +1650,7 @@ void Binary::write(const std::string& filename) { void Binary::write(const std::string& filename, Builder::config_t config) { Builder builder{*this}; - builder.set_config(std::move(config)); + builder.set_config(config); builder.build(); builder.write(filename); } @@ -1663,7 +1663,7 @@ void Binary::write(std::ostream& os) { void Binary::write(std::ostream& os, Builder::config_t config) { Builder builder{*this}; - builder.set_config(std::move(config)); + builder.set_config(config); builder.build(); builder.write(os); } @@ -2638,9 +2638,9 @@ uint64_t Binary::relocate_phdr_table_auto() { } LIEF_DEBUG("Try v1 relocator"); - if ((offset = relocate_phdr_table_v1()) == 0) { + if (auto offset = relocate_phdr_table_v1(); offset == 0) { LIEF_DEBUG("Try v2 relocator"); - if ((offset = relocate_phdr_table_v2()) == 0) { + if (auto offset = relocate_phdr_table_v2(); offset == 0) { LIEF_ERR("Can't relocate the phdr table for this binary. " "Please consider opening an issue"); return 0; @@ -2662,7 +2662,7 @@ uint64_t Binary::relocate_phdr_table_pie() { // Part 1: Make spaces for a new PHDR // -------------------------------------- const uint64_t phdr_offset = header().program_headers_offset(); - uint64_t phdr_size = 0; + uint64_t phdr_size = 0; if (type() == Header::CLASS::ELF32) { phdr_size = sizeof(details::ELF32::Elf_Phdr);