This is the mail archive of the
mailing list for the GDB project.
Re: [patch] Cleanup init_raw_breakpoint
On Friday 11 November 2011 01:56:24, Yao Qi wrote:
> On 11/11/2011 02:45 AM, Pedro Alves wrote:
> > ...
> >> > +
> >> > + if (b->loc == NULL)
> >> > + b->loc = loc;
> > I don't understand the need for the explicit NULL check.
> > When b->loc is NULL, this:
> > for (tmp = &(b->loc); *tmp != NULL; tmp = &((*tmp)->next))
> > ;
> > *tmp = loc;
> > is the same as `b->loc = loc'?
> Hmmm, right. Original code is able to handle NULL. How about this new
Looks good. Ok.