lib: fix uninitialized value
authorZijie Pan <zijie.pan@6wind.com>
Thu, 6 Dec 2012 07:36:51 +0000 (15:36 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 25 Jul 2013 14:07:51 +0000 (16:07 +0200)
Fix warning "The left expression of the compound assignment
is an uninitialized value".

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Acked-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
lib/librte_pmd_e1000/e1000/e1000_vf.c

index 4d8f58b..7f1cd81 100644 (file)
@@ -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++) {