rtl8187: Fix warning generated when strncpy() destination length matches the sixe...
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 20 Aug 2018 18:48:31 +0000 (13:48 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2019 08:52:06 +0000 (09:52 +0100)
commitaa79ce4783d7c2d692c13b071189c6ccb078c371
tree13c627f45daa5cfef1271631ba611cae5ad1a667
parenta92b7adf6ac5964626d0080cd5c6454c991341bf
rtl8187: Fix warning generated when strncpy() destination length matches the sixe argument

[ Upstream commit 199ba9faca909e77ac533449ecd1248123ce89e7 ]

In gcc8, when the 3rd argument (size) of a call to strncpy() matches the
length of the first argument, the compiler warns of the possibility of an
unterminated string. Using strlcpy() forces a null at the end.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtl818x/rtl8187/leds.c