diff options
author | Sasha Neftin <sasha.neftin@intel.com> | 2021-01-17 11:57:02 +0300 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2021-02-04 02:20:32 +0300 |
commit | ed443cdf67b58dfc5c48ce60f5f79ad855316f98 (patch) | |
tree | 863583e35982eff3495def860261da5a31cb6b3a /drivers/net/ethernet/intel/igc | |
parent | 94f794d15a5ea902aabf148f17f5310a2f6ccd67 (diff) | |
download | linux-ed443cdf67b58dfc5c48ce60f5f79ad855316f98.tar.xz |
igc: Prefer strscpy over strlcpy
Use the strscpy method instead of strlcpy method.
See: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr
_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/igc')
-rw-r--r-- | drivers/net/ethernet/intel/igc/igc_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index a3811d7e59bc..824a6c454bca 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -150,7 +150,7 @@ static void igc_ethtool_get_drvinfo(struct net_device *netdev, strscpy(drvinfo->fw_version, adapter->fw_version, sizeof(drvinfo->fw_version)); - strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), + strscpy(drvinfo->bus_info, pci_name(adapter->pdev), sizeof(drvinfo->bus_info)); drvinfo->n_priv_flags = IGC_PRIV_FLAGS_STR_LEN; |