From 89a6dfb4c1012d79676323b666a878ec781b4ca7 Mon Sep 17 00:00:00 2001 From: Serge Lamikhov-Center Date: Sat, 20 Nov 2021 13:21:55 -0800 Subject: [PATCH] Refactoring for 'note' section dump --- elfio/elfio_dump.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/elfio/elfio_dump.hpp b/elfio/elfio_dump.hpp index 8632582..392c772 100644 --- a/elfio/elfio_dump.hpp +++ b/elfio/elfio_dump.hpp @@ -934,7 +934,7 @@ class dump { out << " [" << DUMP_DEC_FORMAT( 2 ) << no << "] "; - const note_tag_t* name_group; + const note_tag_t* name_group = std::end( note_tag_table ); std::vector::const_iterator type_value; name_group = std::find_if( @@ -962,7 +962,6 @@ class dump } if ( descsz != 0 ) { - for ( Elf_Word i = 0; i < descsz; ++i ) { if ( i % 16 == 0 ) { out << std::endl << " ";