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>
Mon, 13 Apr 2020 08:34:20 +0000 (10:34 +0200)
commit3069eab7eeb3da3f42e04ed5422a46bbad3f8c67
tree1ec0b49cc36d1ee7cd507ba303dd6f112db7fcea
parent389f04117453a5fd65d541d995cc9d55a62a42be
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