This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] aoutx.h, aout_final_link, use sizeof int
- From: Michael Snyder <msnyder at vmware dot com>
- To: nickc at redhat dot com, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, bug-binutils at gnu dot org
- Date: Thu, 03 Mar 2011 10:25:31 -0800
- Subject: [RFA] aoutx.h, aout_final_link, use sizeof int
Nick,
Seems to me it should be sizeof int, not int*.
What do you think?
Michael
2011-03-03 Michael Snyder <msnyder@vmware.com>
* aoutx.txt (aout_final_link): Use sizeof int not sizeof int*.
Index: aoutx.h
===================================================================
RCS file: /cvs/src/src/bfd/aoutx.h,v
retrieving revision 1.85
diff -u -p -u -p -r1.85 aoutx.h
--- aoutx.h 13 Dec 2010 01:06:15 -0000 1.85
+++ aoutx.h 3 Mar 2011 18:22:42 -0000
@@ -5448,7 +5448,7 @@ NAME (aout, final_link) (bfd *abfd,
/* Allocate buffers to hold section contents and relocs. */
aout_info.contents = (bfd_byte *) bfd_malloc (max_contents_size);
aout_info.relocs = bfd_malloc (max_relocs_size);
- aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int *));
+ aout_info.symbol_map = (int *) bfd_malloc (max_sym_count * sizeof (int));
aout_info.output_syms = (struct external_nlist *)
bfd_malloc ((max_sym_count + 1) * sizeof (struct external_nlist));
if ((aout_info.contents == NULL && max_contents_size != 0)