zephyr/subsys/shell
Pisit Sawangvonganan f6f8c3f9b7 shell: correct z_shell_spaces_trim when len equal to zero
Addresses a potential issue when the string contains only '\0',
which results in z_shell_strlen(str) returning len as 0.
Since the for-loop expects len >= 1, the function now immediately
returns when len == 0.
As the null check for 'str' is already handled inside
z_shell_strlen(), an additional check for 'str' is not needed.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2023-12-12 15:02:58 +01:00
..
backends shell: telnet: Don't close the connection on EAGAIN error 2023-12-12 10:57:49 +01:00
modules shell: modules: kernel: add human readable uptime 2023-09-28 09:34:00 +02:00
CMakeLists.txt lib: getopt: rework and extend getopt library 2022-01-06 21:26:59 +01:00
Kconfig shell: make ascii filtering optional 2023-08-29 19:22:16 +03:00
Kconfig.template.shell_log_queue_size shell: shell_log_backend: take buffer size from config 2022-11-22 13:05:29 +09:00
Kconfig.template.shell_log_queue_timeout license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
shell.c shell: add new APIs to get the backend instances 2023-10-25 09:57:29 +02:00
shell_cmds.c shell: fix shell instance name typo 2023-12-05 10:44:56 -05:00
shell_fprintf.c shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_help.c shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_help.h shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_history.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
shell_log_backend.c shell: fix a memory corruption coverity issue 2023-10-13 13:11:28 +03:00
shell_ops.c shell: Fix scrolling long commands in history 2023-09-13 16:26:02 +02:00
shell_ops.h Shell: Edit shell to store/retrieve return values 2023-05-02 16:52:21 +02:00
shell_utils.c shell: correct z_shell_spaces_trim when len equal to zero 2023-12-12 15:02:58 +01:00
shell_utils.h shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_vt100.h shell: rework vt100 commands storage 2021-09-28 20:02:01 -04:00
shell_wildcard.c shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00
shell_wildcard.h shell: fix MISRA 5.7 violations on struct shell 2023-04-14 12:21:08 +02:00