examples/ip_pipeline: fix uninitialized scalar variable
PATCH 1/1 examples/ip_pipeline: fix uninitialized scalar variable
Coverity issue: 272575
--- examples/ip_pipeline/cli.c | 2 +- examples/ip_pipeline/link.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-)
examples/ip_pipeline/cli.c +1 -1
@@ -133,7 +133,7 @@ cmd_link(char **tokens, char *out, size_t out_size) { -struct link_params p; +struct link_params p = {0 };struct link_params_rss rss;struct link *link;char *name;
examples/ip_pipeline/link.c +5 -3
@@ -121,17 +121,19 @@ link_create(const char *name, struct link_params *params) (params->tx.queue_size == 0))return NULL ; - port_id = params->port_id;if (params->dev_name) { status =rte_eth_dev_get_port_by_name (params->dev_name, &port_id);if (status)return NULL ; - }else -if (!rte_eth_dev_is_valid_port (port_id)) + }else { +if (!rte_eth_dev_is_valid_port (params->port_id))return NULL ; + port_id = params->port_id; + } +rte_eth_dev_info_get (port_id, &port_info); mempool =mempool_find (params->rx.mempool_name);
Signature · 1 line
2.13.6
PATCH v2 1/1 examples/ip_pipeline: fix uninitialized scalar variable
Coverity issue: 272575
---
v2:
- removed unecessary link.c update
examples/ip_pipeline/cli.c | 2 ++ 1 file changed, 2 insertions(+)
examples/ip_pipeline/cli.c +2 -0
@@ -138,6 +138,8 @@ cmd_link(char **tokens,struct link *link;char *name; +memset (&p,0 ,sizeof (p)); +if ((n_tokens <13 ) || (n_tokens >14 +LINK_RXQ_RSS_MAX )) {snprintf (out, out_size,MSG_ARG_MISMATCH , tokens[0 ]);return ;
Signature · 1 line
2.13.6
Quoted 35 lines
-----Original Message-----
From: Zhang, Roy Fan
Sent: Friday, April 20, 2018 3:39 PM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>; Singh, Jasvinder <[email protected]>
Subject: [PATCH v2] examples/ip_pipeline: fix uninitialized scalar variableCoverity issue: 272575
Fixes 133c2c6565d6 ("examples/ip_pipeline: add link object")Signed-off-by Fan Zhang <[email protected]>---
v2:
- removed unecessarylink.cupdateexamples/ip_pipeline/cli.c | 2 ++ 1 file changed, 2 insertions(+)examples/ip_pipeline/cli.c index renamed from examples/ip_pipeline/cli.c +0
-0
199a31ff8..ec150ce4e100644examples/ip_pipeline/cli.c +2
-1@@ -138,6 +138,8 @@ cmd_link(char **tokens,struct link *link;char *name; +memset (&p,0 ,sizeof (p)); +if ((n_tokens <13 ) || (n_tokens >14 +LINK_RXQ_RSS_MAX )) {snprintf (out, out_size,MSG_ARG_MISMATCH , tokens[0 ]);return ; --
Quoted 1 line
2.13.6
Quoted 10 lines
-----Original Message-----
From: Zhang, Roy Fan
Sent: Monday, April 16, 2018 11:48 AM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>; Singh, Jasvinder <[email protected]>
Subject: [PATCH] examples/ip_pipeline: fix uninitialized scalar variable
Quoted 6 lines
Coverity issue: 272575
Fixes 133c2c6565d6 ("examples/ip_pipeline: add link object")Signed-off-by Fan Zhang <[email protected]>--- examples/ip_pipeline/cli.c | 2 +-
Applied to next-pipeline tree, thanks!