]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8712u: Fix compiler warning about strncpy
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 27 Aug 2018 18:46:46 +0000 (13:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2018 08:18:32 +0000 (10:18 +0200)
commit7ce43fa0267270e091315d65cdc249e5b120f6f9
tree6048b3431f89e34c4dcf431e4db06bbe53cb8c77
parentbf3badf2906f0623f543c0de8ad88a1cd19582ec
staging: rtl8712u: Fix compiler warning about strncpy

When strncpy() is called with source and destination strings the same
length, gcc 8 warns that there may be an unterminated string. Using
strlcpy() rather than strncpy() forces a null at the end and quiets the
warning.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c