Skip to content
Commit 84bc26ee authored by Pisit Sawangvonganan's avatar Pisit Sawangvonganan Committed by Carles Cufí
Browse files

drivers: gpio: shell: streamline code



Streamline code in multiple places as follows:
- Remove redundant initialization of `ret` to `0`,
  as it is immediately assigned a value.
- Add `len` to store the result of `strlen(argv[ARGV_CONF])` to avoid
  multiple calls to `strlen` within the `for-loop` in `cmd_gpio_conf`.
- Merge separate `shell_print` calls by including a newline `\n`.

Signed-off-by: default avatarPisit Sawangvonganan <pisit@ndrsolution.com>
parent 6aefcf0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment