mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
7c37421266
commit
73701cd7cd
35 changed files with 78 additions and 121 deletions
|
|
@ -364,8 +364,8 @@ static int nxscope_put_vector(FAR uint8_t *buff, uint8_t type, FAR void *val,
|
|||
|
||||
DEBUGASSERT(val);
|
||||
|
||||
strncpy((FAR char *)buff, (FAR const char *)val, d);
|
||||
j += strnlen((FAR char *)buff, d);
|
||||
strlcpy((FAR char *)buff, (FAR const char *)val, d);
|
||||
j += strlen((FAR char *)buff);
|
||||
memset(&buff[j], '\0', d - j);
|
||||
j = d;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue