From: David Marchand Date: Mon, 18 Aug 2014 11:29:24 +0000 (+0200) Subject: app/test: no more builtin commands X-Git-Tag: spdx-start~10455 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=df21543fe9d4891c36c162f9c9c6dae44260498a;p=dpdk.git app/test: no more builtin commands The builtin commands list is now empty, we can remove it. Signed-off-by: David Marchand Acked-by: Bruce Richardson Acked-by: Neil Horman --- diff --git a/app/test/commands.c b/app/test/commands.c index 0640ac9881..b7c6ee07c5 100644 --- a/app/test/commands.c +++ b/app/test/commands.c @@ -324,9 +324,8 @@ cmdline_parse_ctx_t main_ctx[] = { int commands_init(void) { struct test_command *t; - char builtin_commands[] = ""; char *commands, *ptr; - int commands_len = strlen(builtin_commands) + 1; + int commands_len = 0; TAILQ_FOREACH(t, &commands_list, next) { commands_len += strlen(t->command) + 1; @@ -340,7 +339,8 @@ int commands_init(void) TAILQ_FOREACH(t, &commands_list, next) { ptr += sprintf(ptr, "%s#", t->command); } - ptr += sprintf(ptr, "%s", builtin_commands); + ptr--; + ptr[0] = '\0'; cmd_autotest_autotest.string_data.str = commands; return 0;