[RFC PATCH 1/4] app/testpmd: register driver specific commands
David Marchand
david.marchand at redhat.com
Fri May 13 12:30:41 CEST 2022
On Fri, May 13, 2022 at 9:57 AM David Marchand
<david.marchand at redhat.com> wrote:
> + TAILQ_FOREACH(parser, &cmdline_parsers, next) {
> + for (i = 0; parser->ctx[i] != NULL; i++) {
> + ctx = realloc(main_ctx, (count + i + 1) * sizeof(*ctx));
> + if (ctx == NULL)
> + goto err;
> + ctx[count + i] = parser->ctx[i];
Strange I did not catch it earlier...
- ctx[count + i] = parser->ctx[i];
+ main_ctx = ctx;
+ main_ctx[count + i] = builtin_ctx[i];
> + }
> + count += i;
> + }
--
David Marchand
More information about the dev
mailing list