summaryrefslogtreecommitdiff
path: root/libdwfl/dwfl_module_build_id.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-03-09 20:49:53 -0700
committerRoland McGrath <roland@redhat.com>2009-03-09 20:49:53 -0700
commit329ed9f91fbc1b9ab34b5acee2e18dd620cd4d12 (patch)
tree919c33563bb671fae487e52fe92c2a0f5e9df525 /libdwfl/dwfl_module_build_id.c
parent8651c5e5f977db488254cdeabb65ebc063be06a4 (diff)
downloadelfutils-329ed9f91fbc1b9ab34b5acee2e18dd620cd4d12.tar.gz
__libdwfl_find_build_id optimization nit
Diffstat (limited to 'libdwfl/dwfl_module_build_id.c')
-rw-r--r--libdwfl/dwfl_module_build_id.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c
index 5d196a9d..f3fcc190 100644
--- a/libdwfl/dwfl_module_build_id.c
+++ b/libdwfl/dwfl_module_build_id.c
@@ -97,6 +97,7 @@ int
internal_function
__libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf)
{
+ size_t shstrndx = SHN_UNDEF;
int result = 0;
Elf_Scn *scn = elf_nextscn (elf, NULL);
@@ -132,7 +133,6 @@ __libdwfl_find_build_id (Dwfl_Module *mod, bool set, Elf *elf)
if (likely (shdr != NULL) && shdr->sh_type == SHT_NOTE)
{
/* Determine the right sh_addr in this module. */
- size_t shstrndx = SHN_UNDEF;
GElf_Addr vaddr = 0;
if (!(shdr->sh_flags & SHF_ALLOC)
|| __libdwfl_relocate_value (mod, elf, &shstrndx,