mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Fix readline_common.c:277:19: error: 'strncpy' destination unchanged after copying no bytes
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
d4290b3e93
commit
44b92d9254
1 changed files with 2 additions and 2 deletions
|
|
@ -274,7 +274,7 @@ static void tab_completion(FAR struct rl_common_s *vtbl, char *buf,
|
|||
|
||||
if (tmp_name[0] == '\0')
|
||||
{
|
||||
strncpy(tmp_name, name, sizeof(tmp_name) - 1);
|
||||
strlcpy(tmp_name, name, sizeof(tmp_name));
|
||||
}
|
||||
|
||||
RL_PUTC(vtbl, ' ');
|
||||
|
|
@ -309,7 +309,7 @@ static void tab_completion(FAR struct rl_common_s *vtbl, char *buf,
|
|||
|
||||
if (tmp_name[0] == '\0')
|
||||
{
|
||||
strncpy(tmp_name, name, sizeof(tmp_name) - 1);
|
||||
strlcpy(tmp_name, name, sizeof(tmp_name));
|
||||
}
|
||||
|
||||
RL_PUTC(vtbl, ' ');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue