wireless: use strlcpy routine in .get_drvinfo
Convert various seemingly still compiled wireless drivers' .get_drvinfo routines to use the preferred strlcpy() routine. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
6048d76384
commit
1f80c230a7
@@ -13,13 +13,14 @@ static void lbs_ethtool_get_drvinfo(struct net_device *dev,
|
||||
{
|
||||
struct lbs_private *priv = dev->ml_priv;
|
||||
|
||||
snprintf(info->fw_version, 32, "%u.%u.%u.p%u",
|
||||
snprintf(info->fw_version, sizeof(info->fw_version),
|
||||
"%u.%u.%u.p%u",
|
||||
priv->fwrelease >> 24 & 0xff,
|
||||
priv->fwrelease >> 16 & 0xff,
|
||||
priv->fwrelease >> 8 & 0xff,
|
||||
priv->fwrelease & 0xff);
|
||||
strcpy(info->driver, "libertas");
|
||||
strcpy(info->version, lbs_driver_version);
|
||||
strlcpy(info->driver, "libertas", sizeof(info->driver));
|
||||
strlcpy(info->version, lbs_driver_version, sizeof(info->version));
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user