The builtin commands list is now empty, we can remove it.
Signed-off-by: David Marchand <david.marchand@6wind.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
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;
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;