Re: [patch] update_global_location_list my comment fix [Re: [PATCH] Fix breakpoint updates for multi-inferior]

Joel Brobecker
2012-02-08T23:32:30Z

I don't know this area, so cannot formally review, but a minor comment:

> + if (a->pspace != b->pspace)
> + return (a->pspace > b->pspace)
> + - (a->pspace < b->pspace);

The GNU Coding Standards asks us to use an extra pair of parentheses
in order to help code formatters, even if it is strictly not necessary
here, thus:

return ((a->pspace > b->pspace)
- ((a->pspace < b->pspace)));

But going beyond this, ISTM that you can simply put the entire
expression on one line and be done with it:

if (a->pspace != b->pspace)
return (a->pspace > b->pspace) - (a->pspace < b->pspace);

--
Joel