]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Minor code cleanups in objdump.
authorUlrich Drepper <drepper@redhat.com>
Fri, 6 Feb 2009 06:10:39 +0000 (22:10 -0800)
committerUlrich Drepper <drepper@redhat.com>
Fri, 6 Feb 2009 06:10:39 +0000 (22:10 -0800)
src/ChangeLog
src/objdump.c

index 287ead3868d3a731f2f29e2d38c09be4325248ca..e05aac10ed25d20a019d911a5ab4fb74852a1db4 100644 (file)
@@ -1,5 +1,7 @@
 2009-02-05  Ulrich Drepper  <drepper@redhat.com>
 
+       * objdump.c (show_relocs_x): Minor cleanups.
+
        * readelf.c (print_cfa_program): Correct a few labels.
 
 2009-02-01  Ulrich Drepper  <drepper@redhat.com>
index 99e42d2b734ebfdea5bb80e93c580cf28fd9dc06..af8abf78ac5607d6eae0b2c4d1d34038ffe82742 100644 (file)
@@ -364,16 +364,15 @@ show_relocs_x (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *symdata,
 {
   int elfclass = gelf_getclass (ebl->elf);
   char buf[128];
-  GElf_Sym symmem;
-  GElf_Sym *sym;
-  Elf32_Word xndx;
 
   printf ("%0*" PRIx64 " %-20s ",
          elfclass == ELFCLASS32 ? 8 : 16, r_offset,
          ebl_reloc_type_name (ebl, GELF_R_TYPE (r_info), buf, sizeof (buf)));
 
-  sym = gelf_getsymshndx (symdata, xndxdata, GELF_R_SYM (r_info),
-                         &symmem, &xndx);
+  Elf32_Word xndx;
+  GElf_Sym symmem;
+  GElf_Sym *sym = gelf_getsymshndx (symdata, xndxdata, GELF_R_SYM (r_info),
+                                   &symmem, &xndx);
 
   if (sym == NULL)
     printf ("<%s %ld>",
@@ -549,7 +548,7 @@ show_relocs (Ebl *ebl, const char *fname, uint32_t shstrndx)
            show_relocs_rela (ebl, shdr, data, symdata, xndxdata,
                              symshdr->sh_link, shstrndx);
 
-         fputs ("\n", stdout);
+         putchar ('\n');
        }
     }