[dpdk-stable] [dpdk-dev] [PATCH] eal/option: fix option register duplicate detection
Thomas Monjalon
thomas at monjalon.net
Wed Dec 19 23:59:35 CET 2018
17/12/2018 11:19, David Marchand:
> On Mon, Dec 17, 2018 at 10:26 AM Gaetan Rivet <gaetan.rivet at 6wind.com>
> wrote:
>
> > Missing brackets around the if means that the loop will end at its first
> > iteration.
> >
> > Cc: stable at dpdk.org
> >
> > Fixes: 2395332798d0 ("eal: add option register infrastructure")
> > Signed-off-by: Gaetan Rivet <gaetan.rivet at 6wind.com>
> > ---
> > 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 <david.marchand at redhat.com>
Applied, thanks
> Different topic but having a return code would be better than a simple log.
+1
More information about the stable
mailing list