[dpdk-dev] example/ip_pipeline: fix value overwrite
Commit Message
Coverity issue: 107136
Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
examples/ip_pipeline/config_parse.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Fan Zhang
> Sent: Friday, December 11, 2015 11:29 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] example/ip_pipeline: fix value overwrite
>
> Coverity issue: 107136
> Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")
>
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
@@ -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(¶m->burst_read,
ent->value);