From 06cf9be95ce16b363c4267d2d17e27c2706629ae Mon Sep 17 00:00:00 2001 From: Zijie Pan Date: Thu, 6 Dec 2012 15:36:51 +0800 Subject: [PATCH] lib: fix uninitialized value Fix warning "The left expression of the compound assignment is an uninitialized value". Signed-off-by: Zijie Pan Acked-by: Ivan Boule Acked-by: Adrien Mazarguil --- lib/librte_pmd_e1000/e1000/e1000_vf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_e1000/e1000/e1000_vf.c b/lib/librte_pmd_e1000/e1000/e1000_vf.c index 4d8f58b1ad..7f1cd8192a 100644 --- a/lib/librte_pmd_e1000/e1000/e1000_vf.c +++ b/lib/librte_pmd_e1000/e1000/e1000_vf.c @@ -414,12 +414,13 @@ void e1000_update_mc_addr_list_vf(struct e1000_hw *hw, DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count); + msgbuf[0] = E1000_VF_SET_MULTICAST; + if (mc_addr_count > 30) { msgbuf[0] |= E1000_VF_SET_MULTICAST_OVERFLOW; mc_addr_count = 30; } - msgbuf[0] = E1000_VF_SET_MULTICAST; msgbuf[0] |= mc_addr_count << E1000_VT_MSGINFO_SHIFT; for (i = 0; i < mc_addr_count; i++) { -- 2.20.1