mirror of
https://github.com/serge1/ELFIO.git
synced 2025-04-16 05:42:31 +00:00
Avoid hiding local variable by another local variable in elfio::load_sections
This commit is contained in:
parent
4b9ff89770
commit
6a2e8c78b0
@ -408,8 +408,8 @@ class elfio
|
|||||||
if ( SHN_UNDEF != shstrndx ) {
|
if ( SHN_UNDEF != shstrndx ) {
|
||||||
string_section_accessor str_reader( sections[shstrndx] );
|
string_section_accessor str_reader( sections[shstrndx] );
|
||||||
for ( Elf_Half i = 0; i < num; ++i ) {
|
for ( Elf_Half i = 0; i < num; ++i ) {
|
||||||
Elf_Word offset = sections[i]->get_name_string_offset();
|
Elf_Word section_offset = sections[i]->get_name_string_offset();
|
||||||
const char* p = str_reader.get_string( offset );
|
const char* p = str_reader.get_string( section_offset );
|
||||||
if ( p != 0 ) {
|
if ( p != 0 ) {
|
||||||
sections[i]->set_name( p );
|
sections[i]->set_name( p );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user