This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] ARI fix: avoid assignment in if clause in xcoffread.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]