diff options
author | John W. Linville <linville@tuxdriver.com> | 2005-09-28 23:50:51 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-04 13:49:12 +0200 |
commit | dbc2309d90b59fbb2676dc2e39150aa095e8c222 (patch) | |
tree | 9d17c84d17c5a46e38fa07fef518f955c9944b5b /drivers/net/s2io.c | |
parent | airo: fix resume (diff) | |
download | linux-dbc2309d90b59fbb2676dc2e39150aa095e8c222.tar.xz linux-dbc2309d90b59fbb2676dc2e39150aa095e8c222.zip |
[PATCH] s2io: change strncpy length arg to use size of target
Use the size of the target array for the length argument to strncpy
instead of the size of the source or a magic number.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 4b9f1828845e..eff747cf3113 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -4177,11 +4177,10 @@ static void s2io_ethtool_gdrvinfo(struct net_device *dev, { nic_t *sp = dev->priv; - strncpy(info->driver, s2io_driver_name, sizeof(s2io_driver_name)); - strncpy(info->version, s2io_driver_version, - sizeof(s2io_driver_version)); - strncpy(info->fw_version, "", 32); - strncpy(info->bus_info, pci_name(sp->pdev), 32); + strncpy(info->driver, s2io_driver_name, sizeof(info->driver)); + strncpy(info->version, s2io_driver_version, sizeof(info->version)); + strncpy(info->fw_version, "", sizeof(info->fw_version)); + strncpy(info->bus_info, pci_name(sp->pdev), sizeof(info->bus_info)); info->regdump_len = XENA_REG_SPACE; info->eedump_len = XENA_EEPROM_SPACE; info->testinfo_len = S2IO_TEST_LEN; |