This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] objdump.c fix formatting.
Hi Alan,
On Mon, Jun 03, 2002 at 02:18:04PM +0930, Alan Modra wrote:
> Your patch _introduces_ formatting errors, and there is no ChangeLog
> entry.
Oh sorry.
> Incidentanlly, I'm not aware of any place where the GNU coding
> standard says not to use unnecessary braces. In fact, it stipulates
Neither do I. I was just browsing objdump.c and saw that all on-line
if statements didn't use braces. I think that this is general for all
the binutils' source code. IIRC, there was a comment on a patch, which had an
one-line if statement inside braces, before a few days.
ANW, I'm repasting the correct version of the patch, in case it is useful.
Elias
2002-06-3 Elias Athanasopoulos <eathan@otenet.gr>
* objdump.c: fix formatting.
--- objdump.c.orig Mon Jun 3 00:04:51 2002
+++ objdump.c Mon Jun 3 13:58:22 2002
@@ -390,11 +390,9 @@
storage = bfd_get_symtab_upper_bound (abfd);
if (storage < 0)
bfd_fatal (bfd_get_filename (abfd));
-
if (storage)
- {
- sy = (asymbol **) xmalloc (storage);
- }
+ sy = (asymbol **) xmalloc (storage);
+
symcount = bfd_canonicalize_symtab (abfd, sy);
if (symcount < 0)
bfd_fatal (bfd_get_filename (abfd));
@@ -424,11 +422,9 @@
bfd_fatal (bfd_get_filename (abfd));
}
-
if (storage)
- {
- sy = (asymbol **) xmalloc (storage);
- }
+ sy = (asymbol **) xmalloc (storage);
+
dynsymcount = bfd_canonicalize_dynamic_symtab (abfd, sy);
if (dynsymcount < 0)
bfd_fatal (bfd_get_filename (abfd));