summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/atheros/atlx/atl2.c
diff options
context:
space:
mode:
authorRick Jones <rick.jones2@hp.com>2011-11-07 17:29:27 +0400
committerDavid S. Miller <davem@davemloft.net>2011-11-09 00:11:57 +0400
commit68aad78c5023b8aa82da99b47f9d8cf40e8ca453 (patch)
treec9f90903bd2e7831ea6fc5231affa3b9fc908b73 /drivers/net/ethernet/atheros/atlx/atl2.c
parent34d2d89f2d7da3b72b3157e778bbf709047ded97 (diff)
downloadlinux-68aad78c5023b8aa82da99b47f9d8cf40e8ca453.tar.xz
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/atl2.c')
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl2.c10
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,
{
struct atl2_adapter *adapter = netdev_priv(netdev);
- strncpy(drvinfo->driver, atl2_driver_name, 32);
- strncpy(drvinfo->version, atl2_driver_version, 32);
- strncpy(drvinfo->fw_version, "L2", 32);
- strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32);
+ strlcpy(drvinfo->driver, atl2_driver_name, sizeof(drvinfo->driver));
+ strlcpy(drvinfo->version, atl2_driver_version,
+ sizeof(drvinfo->version));
+ strlcpy(drvinfo->fw_version, "L2", sizeof(drvinfo->fw_version));
+ strlcpy(drvinfo->bus_info, pci_name(adapter->pdev),
+ sizeof(drvinfo->bus_info));
drvinfo->n_stats = 0;
drvinfo->testinfo_len = 0;
drvinfo->regdump_len = atl2_get_regs_len(netdev);