]> git.baikalelectronics.ru Git - kernel.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:08:39 +0000 (09:08 +0200)
commit5a7ddb93d90d442624af64a5ddde49f13652b8bc
tree5e3f7cc33104567f0eaae2200cad0be95849ecc7
parentecc9337d1f129c6c6171ff53865e5ee95b2320ff
tools/power turbostat: Fix gcc build warnings

[ Upstream commit 66437ac25153a951fdbcdaaa55ab446e0874fc51 ]

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