From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Sami Wagiaalla <swagiaal@redhat.com>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [patch] Add support for imported declaration and correct search order
Date: Fri, 26 Feb 2010 20:11:00 -0000 [thread overview]
Message-ID: <m3y6ifn4fo.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100225224145.GA21231@host0.dyn.jankratochvil.net> (Jan Kratochvil's message of "Thu, 25 Feb 2010 23:41:45 +0100")
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>> + retval->declaration = savestring (declaration, strlen (declaration));
Jan> (sure really only a nitpick)
That is what 70% of my reviews consist of :-)
Jan> These savestring calls can be simplified to:
Jan> # + retval->declaration = xstrdup (declaration);
Jan> as was cleaned up by:
Jan> [obv] Replace savestring by xstrdup where possible
Jan> http://sourceware.org/ml/gdb-patches/2009-05/msg00516.html
Jan> but new `savestring (X, strlen (X))' calls apparently crept in
Jan> since that time.
Yes, thanks -- I forgot about this. In this case I think these have to
be replaced with obstack allocations anyhow, since currently they are
all leaked.
According to the appended semantic patch, the uses of savestring in this
function are the only "bad" ones.
Tom
@@
expression e;
@@
- savestring (e, strlen (e))
+ xstrdup (e)
next prev parent reply other threads:[~2010-02-26 20:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 20:17 Sami Wagiaalla
2010-02-25 21:50 ` Tom Tromey
2010-02-25 22:42 ` Jan Kratochvil
2010-02-26 20:11 ` Tom Tromey [this message]
2010-03-03 21:46 ` Sami Wagiaalla
2010-03-03 22:00 ` Tom Tromey
2010-03-08 16:39 ` Sami Wagiaalla
2010-03-08 18:58 ` Tom Tromey
2010-03-09 18:21 ` Sami Wagiaalla
2010-03-09 18:27 ` Tom Tromey
2010-03-23 20:31 ` Ulrich Weigand
2010-03-23 20:51 ` Sami Wagiaalla
2010-03-23 21:35 ` Ulrich Weigand
2010-03-29 14:48 ` Sami Wagiaalla
2010-03-29 17:27 ` Tom Tromey
2010-03-29 17:23 ` Sami Wagiaalla
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=m3y6ifn4fo.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=swagiaal@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