]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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:09:58 +0000 (09:09 +0200)
commit786957fe9c6f1b32e62e5295b7101db84d6398b9
treecd250a115d2878c1fadcef8c970ffaad413589c8
parent0dde8bc8f983156bd5eb75f5ec2cf6e06fc9e8ae
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