From 31bc7d2d1eb7132127da5fc9f3ee6a254fd109c0 Mon Sep 17 00:00:00 2001 From: Jakub Rzeszutko Date: Tue, 8 Dec 2020 09:29:23 +0100 Subject: [PATCH] shell: make shell_root_cmd_find function static Function shell_root_cmd_find was only used in shell_utils.c file. Hence it is changed to static and renamed to root_cmd_find. Signed-off-by: Jakub Rzeszutko --- subsys/shell/shell_utils.c | 4 ++-- subsys/shell/shell_utils.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/subsys/shell/shell_utils.c b/subsys/shell/shell_utils.c index 1464c0e0327..e28ae47b794 100644 --- a/subsys/shell/shell_utils.c +++ b/subsys/shell/shell_utils.c @@ -228,7 +228,7 @@ static inline uint32_t shell_root_cmd_count(void) } /* Function returning pointer to parent command matching requested syntax. */ -const struct shell_static_entry *shell_root_cmd_find(const char *syntax) +static const struct shell_static_entry *root_cmd_find(const char *syntax) { const size_t cmd_count = shell_root_cmd_count(); const struct shell_cmd_entry *cmd; @@ -344,7 +344,7 @@ int shell_set_root_cmd(const char *cmd) { const struct shell_static_entry *entry; - entry = cmd ? shell_root_cmd_find(cmd) : NULL; + entry = cmd ? root_cmd_find(cmd) : NULL; if (cmd && (entry == NULL)) { return -EINVAL; diff --git a/subsys/shell/shell_utils.h b/subsys/shell/shell_utils.h index 009f98bd519..ad5709c67ac 100644 --- a/subsys/shell/shell_utils.h +++ b/subsys/shell/shell_utils.h @@ -77,8 +77,6 @@ const struct shell_static_entry *shell_get_last_command( struct shell_static_entry *dloc, bool only_static); -const struct shell_static_entry *shell_root_cmd_find(const char *syntax); - void shell_spaces_trim(char *str); static inline void transport_buffer_flush(const struct shell *shell)