[PATCH v2 2/2] app/testpmd: register driver specific commands
David Marchand
david.marchand at redhat.com
Tue May 31 17:18:28 CEST 2022
On Tue, May 31, 2022 at 5:14 PM Andrew Rybchenko
<andrew.rybchenko at oktetlabs.ru> wrote:
>
> On 5/24/22 23:28, Thomas Monjalon wrote:
> > 24/05/2022 22:06, David Marchand:
> >> + count = 0;
> >> + for (i = 0; builtin_ctx[i] != NULL; i++, count++)
> >> + ;
> >> + TAILQ_FOREACH(c, &driver_commands_head, next) {
> >> + for (i = 0; c->commands[i].ctx != NULL; i++, count++)
> >> + ;
> >> + }
> >
> > Just a personal preference:
> > the iterator "i" is incremented inside the "for" instructions,
> > but I would have incremented "count" as a statement of the loops.
>
> Since I dislike loops with empty body as well, I'll change it on
> applying.
I am fine with the proposed form.
Thanks Andrew.
--
David Marchand
More information about the dev
mailing list