Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: nick clifton <nickc@redhat.com>
Cc: Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>,
	gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix copy of filename in bfd's filename field
Date: Fri, 03 Jan 2014 17:53:00 -0000	[thread overview]
Message-ID: <CADPb22RCi=AJeTjAEy8rBEDDus+7i3JGt6ejqcx6OnvYnEmSwA@mail.gmail.com> (raw)
In-Reply-To: <52C6CAB2.9020108@redhat.com>

Hi Nick,

On Fri, Jan 3, 2014 at 6:35 AM, nick clifton <nickc@redhat.com> wrote:
> Hi Edjunior,
>
>
>
>> gdb/
>> 2014-01-03  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
>>
>>         * gdb_bfd.c (gdb_bfd_stash_filename): Fix copy of filename in
>> bfd's
>>         filename field using xstrdup.
>
>
>
>> @@ -69,7 +69,7 @@ gdb_bfd_stash_filename (struct bfd *abfd)
>>     strcpy (data, name);
>>
>>     /* Unwarranted chumminess with BFD.  */
>> -  abfd->filename = data;
>> +  abfd->filename = xstrdup (data);
>>   }
>>
>>   /* An object of this type is stored in each BFD's user data.  */
>
>
> It might be nice to remove the comment too. :-)
>
> Cheers
>   Nick

Seems like bfd should export an API routine that sets abfd->filename,
so that the implementation detail that it lives in malloc space is
kept within bfd.


      reply	other threads:[~2014-01-03 17:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-03 12:59 Edjunior Barbosa Machado
2014-01-03 14:38 ` nick clifton
2014-01-03 17:53   ` Doug Evans [this message]

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='CADPb22RCi=AJeTjAEy8rBEDDus+7i3JGt6ejqcx6OnvYnEmSwA@mail.gmail.com' \
    --to=dje@google.com \
    --cc=emachado@linux.vnet.ibm.com \
    --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