From b8fef54724d0fa35421d85de005d8fe448dc9c94 Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Mon, 9 May 2022 15:24:34 +0200 Subject: [PATCH] sys/shell: drop `_builtin_cmds` define --- sys/shell/shell.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/shell/shell.c b/sys/shell/shell.c index 45bbcc2784bf..b5f91f4b10e3 100644 --- a/sys/shell/shell.c +++ b/sys/shell/shell.c @@ -54,12 +54,6 @@ XFA_INIT_CONST(shell_command_t*, shell_commands_xfa); #define flush_if_needed() #endif /* MODULE_NEWLIB || MODULE_PICOLIBC */ -#ifdef MODULE_SHELL_COMMANDS - #define _builtin_cmds _shell_command_list -#else - #define _builtin_cmds NULL -#endif - #define SQUOTE '\'' #define DQUOTE '"' #define ESCAPECHAR '\\' @@ -117,8 +111,8 @@ static shell_command_handler_t find_handler( handler = search_commands(command_list, command); } - if (handler == NULL && _builtin_cmds != NULL) { - handler = search_commands(_builtin_cmds, command); + if (IS_USED(MODULE_SHELL_COMMANDS) && handler == NULL) { + handler = search_commands(_shell_command_list, command); } if (handler == NULL) { @@ -152,8 +146,8 @@ static void print_help(const shell_command_t *command_list) print_commands(command_list); } - if (_builtin_cmds != NULL) { - print_commands(_builtin_cmds); + if (IS_USED(MODULE_SHELL_COMMANDS)) { + print_commands(_shell_command_list); } print_commands_xfa();