shell: Make shell_strlen return u16_t
Everywhere the return of this function was being assigned to u16_t to save space on stack. Instead of casting in all these places (and may end up with overflow), just changing this function's return. Note that the function itself is not checking for overflow yet since I'm not sure this can happen and/or is a problem. Though now we have only one single point to fix this problem. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
bc4cb76df5
commit
80c03550ba
4 changed files with 13 additions and 12 deletions
|
@ -197,8 +197,8 @@ char shell_make_argv(size_t *argc, char **argv, char *cmd, u8_t max_argc)
|
|||
void shell_pattern_remove(char *buff, u16_t *buff_len, const char *pattern)
|
||||
{
|
||||
char *pattern_addr = strstr(buff, pattern);
|
||||
u16_t shift;
|
||||
u16_t pattern_len = shell_strlen(pattern);
|
||||
size_t shift;
|
||||
|
||||
if (!pattern_addr) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue