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

Joel Brobecker brobecker@adacore.com
Wed Feb 8 23:32:00 GMT 2012


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



More information about the Gdb-patches mailing list