diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-05-19 10:33:00 +0300 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2022-06-26 06:05:31 +0300 |
commit | ac0126a0173531d91d164e244ed1ebbee64bcd54 (patch) | |
tree | 1c153a7fee49913111a2b5d293aa20278a3b57d0 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | ebf21bbc2ff56ad42994f04ada64280bc819bb0b (diff) | |
download | linux-ac0126a0173531d91d164e244ed1ebbee64bcd54.tar.xz |
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 <krzysztof.kozlowski@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220519073301.7072-1-krzysztof.kozlowski@linaro.org
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions