From: Tom Tromey <tromey@redhat.com>
To: Sami Wagiaalla <swagiaal@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [patch] Fix using_directive memory leak pr 11236
Date: Mon, 08 Mar 2010 17:59:00 -0000 [thread overview]
Message-ID: <m3vdd6vgn6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <4B9525DC.3000900@redhat.com> (Sami Wagiaalla's message of "Mon, 08 Mar 2010 11:29:16 -0500")
>>>>> "Sami" == Sami Wagiaalla <swagiaal@redhat.com> writes:
Sami> 2010-03-08 Sami Wagiaalla <swagiaal@redhat.com>
Sami> * cp-namespace.c (cp_add_using): Deleted.
Mention the PR in the ChangeLog entry.
Sami> if (strcmp (current->import_src, src) == 0
Sami> - && strcmp (current->import_dest, dest) == 0)
Sami> + && strcmp (current->import_dest, dest) == 0
Sami> + && ((!alias && !current->alias)
Sami> + || strcmp (current->alias, alias) == 0))
I think this test is still wrong.
First, I think this will crash if alias==NULL but current->alias!=NULL,
or vice versa, because the code can still reach the strcmp.
Second, it doesn't really test the right thing. I think you want
something like:
&& ((alias == NULL && current->alias == NULL)
|| (alias != NULL && current->alias != NULL
&& strcmp (alias, current->alias) == 0))
Tom
next prev parent reply other threads:[~2010-03-08 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-03 20:51 Sami Wagiaalla
2010-03-03 21:49 ` Tom Tromey
2010-03-08 16:33 ` Sami Wagiaalla
2010-03-08 17:59 ` Tom Tromey [this message]
2010-03-09 18:19 ` Sami Wagiaalla
2010-03-09 18:26 ` Tom Tromey
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=m3vdd6vgn6.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--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