bond: fix variable initialization
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 7 Jul 2014 23:36:54 +0000 (00:36 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 18 Jul 2014 23:53:38 +0000 (01:53 +0200)
Variable "valid_slave" wasn't getting properly zero-initialized.
This error is flagged by clang on compile.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Zhaochen Zhan <zhaochen.zhan@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_pmd_bond/rte_eth_bond_pmd.c

index 048de7f..6ce4e57 100644 (file)
@@ -920,7 +920,7 @@ bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type,
        struct bond_dev_private *internals;
        struct rte_eth_link link;
 
-       int i, bonded_port_id, valid_slave, active_pos = -1;
+       int i, bonded_port_id, valid_slave = 0, active_pos = -1;
 
        if (type != RTE_ETH_EVENT_INTR_LSC)
                return;