diff options
author | Rick Jones <rick.jones2@hp.com> | 2011-11-07 08:29:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-08 15:11:57 -0500 |
commit | 68aad78c5023b8aa82da99b47f9d8cf40e8ca453 (patch) | |
tree | c9f90903bd2e7831ea6fc5231affa3b9fc908b73 /drivers/net/ethernet/atheros/atlx | |
parent | 34d2d89f2d7da3b72b3157e778bbf709047ded97 (diff) |
sweep the floors and convert some .get_drvinfo routines to strlcpy
Per the mention made by Ben Hutchings that strlcpy is now the preferred
string copy routine for a .get_drvinfo routine, do a bit of floor
sweeping and convert some of the as-yet unconverted ethernet drivers to
it.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/atheros/atlx')
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index 1feae5928a4b..db3f43046d32 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c | |||
@@ -2049,10 +2049,12 @@ static void atl2_get_drvinfo(struct net_device *netdev, | |||
2049 | { | 2049 | { |
2050 | struct atl2_adapter *adapter = netdev_priv(netdev); | 2050 | struct atl2_adapter *adapter = netdev_priv(netdev); |
2051 | 2051 | ||
2052 | strncpy(drvinfo->driver, atl2_driver_name, 32); | 2052 | strlcpy(drvinfo->driver, atl2_driver_name, sizeof(drvinfo->driver)); |
2053 | strncpy(drvinfo->version, atl2_driver_version, 32); | 2053 | strlcpy(drvinfo->version, atl2_driver_version, |
2054 | strncpy(drvinfo->fw_version, "L2", 32); | 2054 | sizeof(drvinfo->version)); |
2055 | strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); | 2055 | strlcpy(drvinfo->fw_version, "L2", sizeof(drvinfo->fw_version)); |
2056 | strlcpy(drvinfo->bus_info, pci_name(adapter->pdev), | ||
2057 | sizeof(drvinfo->bus_info)); | ||
2056 | drvinfo->n_stats = 0; | 2058 | drvinfo->n_stats = 0; |
2057 | drvinfo->testinfo_len = 0; | 2059 | drvinfo->testinfo_len = 0; |
2058 | drvinfo->regdump_len = atl2_get_regs_len(netdev); | 2060 | drvinfo->regdump_len = atl2_get_regs_len(netdev); |