]> git.droids-corp.org - dpdk.git/commitdiff
net/vmxnet3: fix uninitialized variable
authorYogev Chaimovich <yogev@cgstowernetworks.com>
Thu, 16 May 2019 07:10:38 +0000 (07:10 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 27 May 2019 16:21:54 +0000 (18:21 +0200)
Coverity issue: 323479
Fixes: 30f77abecd38 ("net/vmxnet3: support stats reset")
Cc: stable@dpdk.org
Signed-off-by: Yogev Chaimovich <yogev@cgstowernetworks.com>
Acked-by: Yong Wang <yongwang@vmware.com>
drivers/net/vmxnet3/vmxnet3_ethdev.c

index 79ec42e37338b7f827d53127cb7bf9cab50d971b..2b1e9151105b7ea160b6a632b6c94e28eaa50f77 100644 (file)
@@ -1132,8 +1132,8 @@ vmxnet3_dev_stats_reset(struct rte_eth_dev *dev)
 {
        unsigned int i;
        struct vmxnet3_hw *hw = dev->data->dev_private;
-       struct UPT1_TxStats txStats;
-       struct UPT1_RxStats rxStats;
+       struct UPT1_TxStats txStats = {0};
+       struct UPT1_RxStats rxStats = {0};
 
        VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_STATS);