From: Daniel Jacobowitz <drow@false.org>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] source.c:find_and_open_source cleanup
Date: Thu, 17 Apr 2008 16:15:00 -0000 [thread overview]
Message-ID: <20080417155840.GD17488@caradoc.them.org> (raw)
In-Reply-To: <20080407193412.3CDC11C751F@localhost>
On Mon, Apr 07, 2008 at 12:34:12PM -0700, Doug Evans wrote:
> This is odd:
>
> if (result >= 0)
> {
> char *tmp_fullname;
> tmp_fullname = *fullname;
> *fullname = xstrdup (tmp_fullname);
> xfree (tmp_fullname);
> }
>
> Is there something subtle going on here?
> I thought maybe the caller might be expecting a newly allocated value
> if it passed in a value for `fullname', but the previous value has
> already been freed at this point.
>
> 2008-04-07 Doug Evans <dje@google.com>
>
> * source.c (find_and_open_source): Add some comments clarifying
> handling of FULLNAME argument. Make static. Remove pointless
> xstrdup/xfree.
Looks good to me. Please commit, thanks!
--
Daniel Jacobowitz
CodeSourcery
prev parent reply other threads:[~2008-04-17 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-07 22:26 Doug Evans
2008-04-07 22:56 ` Doug Evans
2008-04-17 16:15 ` Daniel Jacobowitz [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=20080417155840.GD17488@caradoc.them.org \
--to=drow@false.org \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/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