diff mbox series

[v4,10/11] app/regex: fix usage text

Message ID 20210321223116.1340974-11-thomas@monjalon.net (mailing list archive)
State Superseded
Delegated to: David Marchand
Headers show
Series improve options help | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon March 21, 2021, 10:31 p.m. UTC
The usage syntax help includes the program name which was fake.
It is replaced with the real name from argv.

Fixes: de06137cb295 ("app/regex: add RegEx test application")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
 app/test-regex/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series


diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index ba09b20126..73ba227fba 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -151,10 +151,10 @@  args_parse(int argc, char **argv, char *rules_file, char *data_file,
 			*nb_lcores = atoi(optarg);
 		case ARG_HELP:
-			usage("RegEx test app");
+			usage(argv[0]);
-			usage("RegEx test app");
+			usage(argv[0]);
 			rte_exit(EXIT_FAILURE, "Invalid option: %s\n", argv[optind]);