Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: nickc@redhat.com,
	 "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	bug-binutils@gnu.org
Subject: [RFA] aoutx.h, aout_final_link, use sizeof int
Date: Thu, 03 Mar 2011 18:25:00 -0000	[thread overview]
Message-ID: <4D6FDD1B.1010501@vmware.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 83 bytes --]

Nick,

Seems to me it should be sizeof int, not int*.
What do you think?

Michael


[-- Attachment #2: aoutx.txt --]
[-- Type: text/plain, Size: 962 bytes --]

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)

             reply	other threads:[~2011-03-03 18:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03 18:25 Michael Snyder [this message]
2011-03-03 22:16 ` Alan Modra
2011-03-03 23:47   ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D6FDD1B.1010501@vmware.com \
    --to=msnyder@vmware.com \
    --cc=bug-binutils@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox