If the destination buffer has a fixed length, strscpy() automatically determines the size of the destination buffer using sizeof() if the argument is omitted. This makes the explicit sizeof() unnecessary. Furthermore, CMD_BUFLEN is equal to sizeof(kdb_prompt_str) and can also be removed. Remove them to shorten and simplify the code. No functional changes intended. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Justin Stitt <justinstitt@google.com> Link: https://lore.kernel.org/r/20250319163341.2123-2-thorsten.blum@linux.dev Signed-off-by: Daniel Thompson <daniel@riscstar.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| Makefile | ||
| kdb_bp.c | ||
| kdb_bt.c | ||
| kdb_cmds | ||
| kdb_debugger.c | ||
| kdb_io.c | ||
| kdb_keyboard.c | ||
| kdb_main.c | ||
| kdb_private.h | ||
| kdb_support.c | ||