On Thursday 08 January 2009, Jérémy Bobbio wrote:
> > +static int debconf_to_pri (char *priority) {
> > + int i;
> > + int pri = -1;
> > +
> > + if (priority) {
> > + for (i = 0; (size_t)i < ARRAY_SIZE(debconf_priorities); ++i) {
> > + if (0 == strcmp(priority, debconf_priorities[i]) ) {
> > + pri = i;
> > + break;
> > + }
> > + }
> > + }
> > +
> > + return pri;
> > +}
>
> Purely stylist comment: "pri" could be entirely avoided by replacing
> the inner if content with "return i", and the fallback case with
> "return -1".Committed. I've also removed all braces as there are now no multiple statements anymore. > > + if (menu_pri == -1) > > + debconf_to_pri(MENU_PRIORITY); > > This last line surely should have been: > menu_pri = debconf_to_pri(MENU_PRIORITY); > > But it was replaced in r56986, so this probably does not matter much. Eh, yes. Thanks for the review.
signature.asc
Description: This is a digitally signed message part.

