This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] nm.c: Remove unused if/else
- From: Marek Polacek <mpolacek at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Tue, 10 May 2011 22:39:07 +0200
- Subject: [PATCH] nm.c: Remove unused if/else
FWIW, this removes the always true if and also the never executed else branch.
Maybe that unused branch is there for some particular reason, but if not,
I think it can be removed. Should I apply?
2011-05-10 Marek Polacek <mpolacek@redhat.com>
* nm.c (show_symbols_sysv): Remove unused if branch.
--- elfutils/src/nm.c.mp 2011-05-07 18:19:10.355146087 +0200
+++ elfutils/src/nm.c 2011-05-10 22:27:51.838447583 +0200
@@ -762,10 +762,7 @@ show_symbols_sysv (Ebl *ebl, GElf_Word s
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"),