From 1ca78c81be0d6399e05709a18abd8c2fe6b1a782 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 8 Jul 2014 00:36:54 +0100 Subject: [PATCH] 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 --- lib/librte_pmd_bond/rte_eth_bond_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1