]> git.baikalelectronics.ru Git - kernel.git/commit
staging: qlge/qlge_ethtool.c: Switch from strlcpy to strscpy
authorKumar Kartikeya Dwivedi <memxor@gmail.com>
Sat, 30 Jan 2021 04:48:28 +0000 (10:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 Jan 2021 12:39:16 +0000 (13:39 +0100)
commit8249f9dd402c73f244e32ac1f5c3751d1b250713
tree8ebf6b78134984171ed639204f0999b9ef86a7ec
parenta71621f39cc5a8f8d0539c3b95c632e0e7e04098
staging: qlge/qlge_ethtool.c: Switch from strlcpy to strscpy

strlcpy is marked as deprecated in Documentation/process/deprecated.rst,
and there is no functional difference when the caller expects truncation
(when not checking the return value). strscpy is relatively better as it
also avoids scanning the whole source string.

This silences the related checkpatch warnings from:
6ce08ded83b6 ("checkpatch: prefer strscpy to strlcpy")

Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20210130044828.121248-1-memxor@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/qlge/qlge_ethtool.c