From 6bed8fc2410f91b4ca9f40cf0e62d7b01caf81b0 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Thu, 6 Dec 2018 10:36:11 -0800 Subject: [PATCH] shell: Changing shell_history_get signature Change arg_len to be u16_t in shell_history_get since it is returning a value that can be hold by u16_t. Signed-off-by: Flavio Ceolin --- include/shell/shell_history.h | 2 +- subsys/shell/shell.c | 2 +- subsys/shell/shell_cmds.c | 2 +- subsys/shell/shell_history.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/shell/shell_history.h b/include/shell/shell_history.h index 33ebdc4bd28..88978e6c959 100644 --- a/include/shell/shell_history.h +++ b/include/shell/shell_history.h @@ -45,7 +45,7 @@ void shell_history_mode_exit(struct shell_history *history); /* returns true if remains in history mode.*/ bool shell_history_get(struct shell_history *history, bool up, - u8_t *dst, size_t *len); + u8_t *dst, u16_t *len); void shell_history_put(struct shell_history *history, u8_t *line, size_t len); diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c index f23a8c9bdf3..bca0e73bf59 100644 --- a/subsys/shell/shell.c +++ b/subsys/shell/shell.c @@ -468,7 +468,7 @@ static void tab_options_print(const struct shell *shell, static u16_t common_beginning_find(const struct shell_static_entry *cmd, const char **str, - size_t first, size_t cnt, size_t arg_len) + size_t first, size_t cnt, u16_t arg_len) { struct shell_static_entry dynamic_entry; const struct shell_static_entry *match; diff --git a/subsys/shell/shell_cmds.c b/subsys/shell/shell_cmds.c index a6c545c19e4..ef07e4bbca1 100644 --- a/subsys/shell/shell_cmds.c +++ b/subsys/shell/shell_cmds.c @@ -288,7 +288,7 @@ static int cmd_history(const struct shell *shell, size_t argc, char **argv) ARG_UNUSED(argv); size_t i = 0; - size_t len; + u16_t len; if (!IS_ENABLED(CONFIG_SHELL_HISTORY)) { shell_error(shell, "Command not supported."); diff --git a/subsys/shell/shell_history.c b/subsys/shell/shell_history.c index 5ff73d6e4eb..76f88681361 100644 --- a/subsys/shell/shell_history.c +++ b/subsys/shell/shell_history.c @@ -19,7 +19,7 @@ void shell_history_mode_exit(struct shell_history *history) } bool shell_history_get(struct shell_history *history, bool up, - u8_t *dst, size_t *len) + u8_t *dst, u16_t *len) { struct shell_history_item *h_item; /* history item */ sys_dnode_t *l_item; /* list item */