Avoid hiding local variable by another local variable in elfio::load_sections

This commit is contained in:
Pavel I. Kryukov 2018-07-20 15:42:53 +03:00 committed by Serge Lamikhov-Center
parent 4b9ff89770
commit 6a2e8c78b0

View File

@ -408,8 +408,8 @@ class elfio
if ( SHN_UNDEF != shstrndx ) {
string_section_accessor str_reader( sections[shstrndx] );
for ( Elf_Half i = 0; i < num; ++i ) {
Elf_Word offset = sections[i]->get_name_string_offset();
const char* p = str_reader.get_string( offset );
Elf_Word section_offset = sections[i]->get_name_string_offset();
const char* p = str_reader.get_string( section_offset );
if ( p != 0 ) {
sections[i]->set_name( p );
}