diff options
author | Don Skidmore <donald.c.skidmore@intel.com> | 2010-12-03 04:33:54 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2010-12-11 01:12:58 -0500 |
commit | 9fe93afdd07aba52a018eb52784124579a80470e (patch) | |
tree | 064f2e4da3cb5eaa61a0378839e86d23c5a30905 /drivers/net/ixgbe/ixgbe_main.c | |
parent | 5136cad37b276e3e11c4f8ad0bcf9cb2eec0e5af (diff) |
ixgbe: cleanup string function calls to use bound checking versions.
Some minor cleanup to use string calls that use bound checks just to
be extra safe.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index f2694f2b127a..8af0fc051696 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2338,14 +2338,14 @@ static int ixgbe_request_msix_irqs(struct ixgbe_adapter *adapter) | |||
2338 | handler = SET_HANDLER(q_vector); | 2338 | handler = SET_HANDLER(q_vector); |
2339 | 2339 | ||
2340 | if (handler == &ixgbe_msix_clean_rx) { | 2340 | if (handler == &ixgbe_msix_clean_rx) { |
2341 | sprintf(q_vector->name, "%s-%s-%d", | 2341 | snprintf(q_vector->name, sizeof(q_vector->name) - 1, |
2342 | netdev->name, "rx", ri++); | 2342 | "%s-%s-%d", netdev->name, "rx", ri++); |
2343 | } else if (handler == &ixgbe_msix_clean_tx) { | 2343 | } else if (handler == &ixgbe_msix_clean_tx) { |
2344 | sprintf(q_vector->name, "%s-%s-%d", | 2344 | snprintf(q_vector->name, sizeof(q_vector->name) - 1, |
2345 | netdev->name, "tx", ti++); | 2345 | "%s-%s-%d", netdev->name, "tx", ti++); |
2346 | } else if (handler == &ixgbe_msix_clean_many) { | 2346 | } else if (handler == &ixgbe_msix_clean_many) { |
2347 | sprintf(q_vector->name, "%s-%s-%d", | 2347 | snprintf(q_vector->name, sizeof(q_vector->name) - 1, |
2348 | netdev->name, "TxRx", ri++); | 2348 | "%s-%s-%d", netdev->name, "TxRx", ri++); |
2349 | ti++; | 2349 | ti++; |
2350 | } else { | 2350 | } else { |
2351 | /* skip this unused q_vector */ | 2351 | /* skip this unused q_vector */ |
@@ -7047,7 +7047,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
7047 | netdev->netdev_ops = &ixgbe_netdev_ops; | 7047 | netdev->netdev_ops = &ixgbe_netdev_ops; |
7048 | ixgbe_set_ethtool_ops(netdev); | 7048 | ixgbe_set_ethtool_ops(netdev); |
7049 | netdev->watchdog_timeo = 5 * HZ; | 7049 | netdev->watchdog_timeo = 5 * HZ; |
7050 | strcpy(netdev->name, pci_name(pdev)); | 7050 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); |
7051 | 7051 | ||
7052 | adapter->bd_number = cards_found; | 7052 | adapter->bd_number = cards_found; |
7053 | 7053 | ||
@@ -7269,7 +7269,7 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
7269 | 7269 | ||
7270 | err = ixgbe_read_pba_string_generic(hw, part_str, IXGBE_PBANUM_LENGTH); | 7270 | err = ixgbe_read_pba_string_generic(hw, part_str, IXGBE_PBANUM_LENGTH); |
7271 | if (err) | 7271 | if (err) |
7272 | strcpy(part_str, "Unknown"); | 7272 | strncpy(part_str, "Unknown", IXGBE_PBANUM_LENGTH); |
7273 | if (ixgbe_is_sfp(hw) && hw->phy.sfp_type != ixgbe_sfp_type_not_present) | 7273 | if (ixgbe_is_sfp(hw) && hw->phy.sfp_type != ixgbe_sfp_type_not_present) |
7274 | e_dev_info("MAC: %d, PHY: %d, SFP+: %d, PBA No: %s\n", | 7274 | e_dev_info("MAC: %d, PHY: %d, SFP+: %d, PBA No: %s\n", |
7275 | hw->mac.type, hw->phy.type, hw->phy.sfp_type, | 7275 | hw->mac.type, hw->phy.type, hw->phy.sfp_type, |