tools/power turbostat: Fix gcc build warnings
authorLen Brown <len.brown@intel.com>
Thu, 19 Mar 2020 22:33:12 +0000 (18:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Apr 2020 07:08:39 +0000 (09:08 +0200)
commit0ba0ce3cbb866e1b8fe688a89a73a6d3861490a5
tree5e3f7cc33104567f0eaae2200cad0be95849ecc7
parent7ebc1e53a46b5256438988bfec15a50b941b04f1
tools/power turbostat: Fix gcc build warnings

[ Upstream commit d8d005ba6afa502ca37ced5782f672c4d2fc1515 ]

Warning: ‘__builtin_strncpy’ specified bound 20 equals destination size
[-Wstringop-truncation]

reduce param to strncpy, to guarantee that a null byte is always copied
into destination buffer.

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/power/x86/turbostat/turbostat.c