summaryrefslogtreecommitdiffstats
path: root/tests/elfstrmerge.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/elfstrmerge.c')
-rw-r--r--tests/elfstrmerge.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c
index 8d5b53cb..3bb90c42 100644
--- a/tests/elfstrmerge.c
+++ b/tests/elfstrmerge.c
@@ -195,7 +195,7 @@ main (int argc, char **argv)
size_t symtabndx = 0;
Elf_Scn *symtabscn = NULL;
GElf_Shdr symtabshdr_mem;
- GElf_Shdr *symtabshdr;
+ GElf_Shdr *symtabshdr = NULL;
while ((symtabscn = elf_nextscn (elf, symtabscn)) != NULL)
{
symtabshdr = gelf_getshdr (symtabscn, &symtabshdr_mem);
@@ -210,7 +210,7 @@ main (int argc, char **argv)
}
}
- if (symtabndx == 0)
+ if (symtabshdr == NULL)
fail ("No symtab found", fname);
if ((symtabshdr->sh_flags & SHF_ALLOC) != 0)
@@ -578,7 +578,8 @@ main (int argc, char **argv)
break;
case SHT_DYNAMIC:
- /* Fallthrough. There are string indexes in here, but
+ FALLTHROUGH;
+ /* There are string indexes in here, but
they (should) point to a allocated string table,
which we don't alter. */
default: