hns: use strscpy() to instead of strncpy()
authorXu Panda <xu.panda@zte.com.cn>
Fri, 9 Dec 2022 07:33:25 +0000 (15:33 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Dec 2022 10:00:55 +0000 (10:00 +0000)
commit94d30e8933382184b257e94ac0d020d3f56ed614
treedc430e1e0ebc73545a1339ec97fdfb6fb6e63475
parent6d534ee057b62ca9332b988619323ee99c7847c1
hns: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c