Skip to content

Commit

Permalink
examples/packet_ordering: use proper exit method
Browse files Browse the repository at this point in the history
[ upstream commit d74fab8 ]

rte_exit should be called when the application exits due to
invalid EAL or application arguments.

Fixes: 850f373 ("examples/packet_ordering: new sample app")

Signed-off-by: Sarosh Arif <sarosh.arif@emumba.com>
  • Loading branch information
sarosh-arif authored and kevintraynor committed Aug 28, 2020
1 parent 15f7abe commit 08e79f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/packet_ordering/main.c
Expand Up @@ -621,15 +621,15 @@ main(int argc, char **argv)
/* Initialize EAL */
ret = rte_eal_init(argc, argv);
if (ret < 0)
return -1;
rte_exit(EXIT_FAILURE, "Invalid EAL arguments\n");

argc -= ret;
argv += ret;

/* Parse the application specific arguments */
ret = parse_args(argc, argv);
if (ret < 0)
return -1;
rte_exit(EXIT_FAILURE, "Invalid packet_ordering arguments\n");

/* Check if we have enought cores */
if (rte_lcore_count() < 3)
Expand Down

0 comments on commit 08e79f9

Please sign in to comment.