17/12/2018 11:19, David Marchand: > On Mon, Dec 17, 2018 at 10:26 AM Gaetan Rivet <[email protected]> > wrote: > > > Missing brackets around the if means that the loop will end at its first > > iteration. > > > > Cc: [email protected] > > > > Fixes: 2395332798d0 ("eal: add option register infrastructure") > > Signed-off-by: Gaetan Rivet <[email protected]> > > --- > > rte_option_register(struct rte_option *opt) > > { > > TAILQ_FOREACH(option, &rte_option_list, next) { > > - if (strcmp(opt->opt_str, option->opt_str) == 0) > > + if (strcmp(opt->opt_str, option->opt_str) == 0) { > > RTE_LOG(INFO, EAL, "Option %s has already been > > registered.", > > opt->opt_str); > > return; > > + } > > } > > Reviewed-by: David Marchand <[email protected]>
Applied, thanks > Different topic but having a return code would be better than a simple log. +1

