From 612a94d6f24eb2427eabf554392080302da664dd Mon Sep 17 00:00:00 2001 From: Rick Jones Date: Mon, 14 Nov 2011 08:13:25 +0000 Subject: Sweep the last of the active .get_drvinfo floors under ethernet/ This round of floor sweeping converts strncpy calls in various .get_drvinfo routines to the preferred strlcpy. It also does a modicum of other cleaning in those routines. Signed-off-by: Rick Jones Signed-off-by: David S. Miller --- drivers/net/ethernet/sun/cassini.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/net/ethernet/sun') diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index fd40988c19a..f10665f594c 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c @@ -4532,10 +4532,9 @@ static void cas_set_multicast(struct net_device *dev) static void cas_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) { struct cas *cp = netdev_priv(dev); - strncpy(info->driver, DRV_MODULE_NAME, ETHTOOL_BUSINFO_LEN); - strncpy(info->version, DRV_MODULE_VERSION, ETHTOOL_BUSINFO_LEN); - info->fw_version[0] = '\0'; - strncpy(info->bus_info, pci_name(cp->pdev), ETHTOOL_BUSINFO_LEN); + strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version)); + strlcpy(info->bus_info, pci_name(cp->pdev), sizeof(info->bus_info)); info->regdump_len = cp->casreg_len < CAS_MAX_REGS ? cp->casreg_len : CAS_MAX_REGS; info->n_stats = CAS_NUM_STAT_KEYS; -- cgit v1.2.3