lkml.org 
[lkml]   [2022]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 1/2] soc: qcom: cmd-db: replace strncpy() with strscpy_pad()
Date
On Thu, 19 May 2022 09:33:00 +0200, Krzysztof Kozlowski wrote:
> The use of strncpy() is considered deprecated for NUL-terminated
> strings[1]. Replace strncpy() with strscpy_pad(), to keep existing
> pad-behavior of strncpy. This fixes W=1 warning:
>
> drivers/soc/qcom/cmd-db.c: In function ‘cmd_db_get_header.part.0’:
> drivers/soc/qcom/cmd-db.c:151:9: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation]
> 151 | strncpy(query, id, sizeof(query));
>
> [...]

Applied, thanks!

[1/2] soc: qcom: cmd-db: replace strncpy() with strscpy_pad()
commit: ac0126a0173531d91d164e244ed1ebbee64bcd54
[2/2] soc: qcom: correct kerneldoc
commit: d11a34a404ee5565ce8e0abe3e2b9ce6f5cc0a4b

Best regards,
--
Bjorn Andersson <bjorn.andersson@linaro.org>

\
 
 \ /
  Last update: 2022-06-27 22:05    [W:0.653 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site