]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
nm.c: Remove unused if/else and parameters.
authorMarek Polacek <mpolacek@redhat.com>
Thu, 12 May 2011 10:08:21 +0000 (12:08 +0200)
committerMarek Polacek <mpolacek@redhat.com>
Thu, 12 May 2011 10:08:21 +0000 (12:08 +0200)
src/ChangeLog
src/nm.c

index 6c49eef06de523a2f3c5c844e5d90befa607da34..91e5d377f738c0dfc222f199ab3ce51a9d5c6427 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-11  Marek Polacek  <mpolacek@redhat.com>
+
+       * nm.c (show_symbols_sysv): Remove unused if/else, remove
+       unused `prefix' and `fname' parameters.
+
 2011-05-07  Marek Polacek  <mpolacek@redhat.com>
 
        * unstrip.c (compare_sections_nonrel): Mark this function as static.
index 01519a5aef3ca69d8c22ac5df7141546c301d669..f78861ece683256437fb22ca5c47de0badd40a7a 100644 (file)
--- a/src/nm.c
+++ b/src/nm.c
@@ -718,8 +718,7 @@ sym_name (Elf *elf, GElf_Word strndx, GElf_Word st_name, char buf[], size_t n)
 
 /* Show symbols in SysV format.  */
 static void
-show_symbols_sysv (Ebl *ebl, GElf_Word strndx,
-                  const char *prefix, const char *fname, const char *fullname,
+show_symbols_sysv (Ebl *ebl, GElf_Word strndx, const char *fullname,
                   GElf_SymX *syms, size_t nsyms, int longest_name,
                   int longest_where)
 {
@@ -762,10 +761,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word strndx,
   int digits = length_map[gelf_getclass (ebl->elf) - 1][radix];
 
   /* We always print this prolog.  */
-  if (prefix == NULL || 1)
-    printf (gettext ("\n\nSymbols from %s:\n\n"), fullname);
-  else
-    printf (gettext ("\n\nSymbols from %s[%s]:\n\n"), prefix, fname);
+  printf (gettext ("\n\nSymbols from %s:\n\n"), fullname);
 
   /* The header line.  */
   printf (gettext ("%*s%-*s %-*s Class  Type     %-*s %*s Section\n\n"),
@@ -1185,9 +1181,8 @@ show_symbols (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, Elf_Scn *xndxscn,
   switch (format)
     {
     case format_sysv:
-      show_symbols_sysv (ebl, shdr->sh_link, prefix, fname,
-                        fullname, sym_mem, nentries, longest_name,
-                        longest_where);
+      show_symbols_sysv (ebl, shdr->sh_link, fullname, sym_mem, nentries,
+                        longest_name, longest_where);
       break;
 
     case format_bsd: