[dpdk-dev] [PATCH] example/ip_pipeline: fix value overwrite

Fan Zhang roy.fan.zhang at intel.com
Fri Dec 11 12:29:11 CET 2015


Coverity issue: 107136
Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")

Signed-off-by: Fan Zhang <roy.fan.zhang at intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
---
 examples/ip_pipeline/config_parse.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/ip_pipeline/config_parse.c b/examples/ip_pipeline/config_parse.c
index 67e58c9..4e194d6 100644
--- a/examples/ip_pipeline/config_parse.c
+++ b/examples/ip_pipeline/config_parse.c
@@ -1631,8 +1631,8 @@ parse_tm(struct app_params *app,
 			param->file_name = strdup(ent->value);
 			if (param->file_name == NULL)
 				ret = -EINVAL;
-
-			ret = 0;
+			else
+				ret = 0;
 		} else if (strcmp(ent->name, "burst_read") == 0)
 			ret = parser_read_uint32(&param->burst_read,
 				ent->value);
-- 
2.5.0



More information about the dev mailing list