From: Bruce Richardson Date: Mon, 7 Jul 2014 23:36:54 +0000 (+0100) Subject: bond: fix variable initialization X-Git-Tag: spdx-start~10532 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1ca78c81be0d6399e05709a18abd8c2fe6b1a782;p=dpdk.git bond: fix variable initialization Variable "valid_slave" wasn't getting properly zero-initialized. This error is flagged by clang on compile. Signed-off-by: Bruce Richardson Tested-by: Zhaochen Zhan Acked-by: Thomas Monjalon --- diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c index 048de7f3b7..6ce4e5785c 100644 --- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c +++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c @@ -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;