net: hns3: use strscpy() to instead of strncpy()
authorXu Panda <xu.panda@zte.com.cn>
Fri, 9 Dec 2022 07:38:59 +0000 (15:38 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 12 Dec 2022 21:00:00 +0000 (13:00 -0800)
commit80a464d83f08cac5052c7f857fc067b3fe88071d
tree5e5f0530a2df19f7022a3d10748a541824fa9e3f
parentda05cecc4939c0410d56c29e252998b192756318
net: hns3: use strscpy() to instead of strncpy()

The implementation of strscpy() is more robust and safer.
That's now the recommended way to copy NUL terminated strings.

Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
Signed-off-by: Yang Yang <yang.yang29@zte.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/202212091538591375035@zte.com.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c