diff options
author | Krzysztof Kozlowski <[email protected]> | 2022-05-19 09:33:00 +0200 |
---|---|---|
committer | Bjorn Andersson <[email protected]> | 2022-06-25 22:05:31 -0500 |
commit | ac0126a0173531d91d164e244ed1ebbee64bcd54 (patch) | |
tree | 1c153a7fee49913111a2b5d293aa20278a3b57d0 /drivers/usb/cdns3/cdns3-trace.c | |
parent | ebf21bbc2ff56ad42994f04ada64280bc819bb0b (diff) |
soc: qcom: cmd-db: replace strncpy() with strscpy_pad()
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));
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Reviewed-by: Stephen Boyd <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-trace.c')
0 files changed, 0 insertions, 0 deletions