[dpdk-dev] testpmd: initialize rx_fc_en and tx_fc_en to zero

Message ID 1424188356-13543-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

De Lara Guarch, Pablo Feb. 17, 2015, 3:52 p.m. UTC
  rx_fc_en and tx_fc_en in cmd_link_flow_ctrl_set_parsed
could be used without being initialized.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-pmd/cmdline.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
  

Comments

Thomas Monjalon Feb. 20, 2015, 11:15 a.m. UTC | #1
2015-02-17 15:52, Pablo de Lara:
> rx_fc_en and tx_fc_en in cmd_link_flow_ctrl_set_parsed
> could be used without being initialized.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b2aab40..d52ba89 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -5117,7 +5117,7 @@  cmd_link_flow_ctrl_set_parsed(void *parsed_result,
 	struct cmd_link_flow_ctrl_set_result *res = parsed_result;
 	cmdline_parse_inst_t *cmd = data;
 	struct rte_eth_fc_conf fc_conf;
-	int rx_fc_en, tx_fc_en;
+	int rx_fc_en, tx_fc_en = 0;
 	int ret;
 
 	/*