Skip to content

Commit 31bc7d2

Browse files
Jakub Rzeszutkocarlescufi
authored andcommitted
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 <[email protected]>
1 parent 0738e1f commit 31bc7d2

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

subsys/shell/shell_utils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static inline uint32_t shell_root_cmd_count(void)
228228
}
229229

230230
/* Function returning pointer to parent command matching requested syntax. */
231-
const struct shell_static_entry *shell_root_cmd_find(const char *syntax)
231+
static const struct shell_static_entry *root_cmd_find(const char *syntax)
232232
{
233233
const size_t cmd_count = shell_root_cmd_count();
234234
const struct shell_cmd_entry *cmd;
@@ -344,7 +344,7 @@ int shell_set_root_cmd(const char *cmd)
344344
{
345345
const struct shell_static_entry *entry;
346346

347-
entry = cmd ? shell_root_cmd_find(cmd) : NULL;
347+
entry = cmd ? root_cmd_find(cmd) : NULL;
348348

349349
if (cmd && (entry == NULL)) {
350350
return -EINVAL;

subsys/shell/shell_utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ const struct shell_static_entry *shell_get_last_command(
7777
struct shell_static_entry *dloc,
7878
bool only_static);
7979

80-
const struct shell_static_entry *shell_root_cmd_find(const char *syntax);
81-
8280
void shell_spaces_trim(char *str);
8381

8482
static inline void transport_buffer_flush(const struct shell *shell)

0 commit comments

Comments
 (0)