diff mbox

[dpdk-dev,1/3] bonding: remove useless memset

Message ID 1433365992-9173-2-git-send-email-stephen@networkplumber.org (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Stephen Hemminger June 3, 2015, 9:13 p.m. UTC
Remove 2 unneeded memset's.  The info area is already cleared rte_eth_dev_info_get
and the statistics buffer is cleared by rte_eth_stats_get

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/bonding/rte_eth_bond_api.c | 1 -
 drivers/net/bonding/rte_eth_bond_pmd.c | 4 ----
 2 files changed, 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index e91a623..d4caa83 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -363,7 +363,6 @@  __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id)
 	/* Add slave details to bonded device */
 	slave_add(internals, slave_eth_dev);
 
-	memset(&dev_info, 0, sizeof(dev_info));
 	rte_eth_dev_info_get(slave_port_id, &dev_info);
 
 	if (internals->slave_count < 1) {
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index c937e6b..8bad2e1 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -1730,12 +1730,8 @@  bond_ethdev_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
 {
 	struct bond_dev_private *internals = dev->data->dev_private;
 	struct rte_eth_stats slave_stats;
-
 	int i;
 
-	/* clear bonded stats before populating from slaves */
-	memset(stats, 0, sizeof(*stats));
-
 	for (i = 0; i < internals->slave_count; i++) {
 		rte_eth_stats_get(internals->slaves[i].port_id, &slave_stats);