This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] ARI fix: avoid assignment in if clause in xcoffread.c
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- Date: Tue, 19 Apr 2011 15:01:53 +0100
- Subject: Re: [RFA] ARI fix: avoid assignment in if clause in xcoffread.c
- References: <000901cbfe97$9ed7f120$dc87d360$@muller@ics-cnrs.unistra.fr>
On Tuesday 19 April 2011 14:42:25, Pierre Muller wrote:
> If I understand the code correctly, this patch
> should have no effect, the only thing that could have is
> an unnecessary call to strchr.
> The other alternative would be to
> do a
> + if (*name == ':')
> + retrun NULL;
> + pp = (char *) strchr (name, ':');
> + if (pp == NULL)
> would that be better?
Yes, okay with that change.
--
Pedro Alves