From: Cristian Dumitrescu Date: Tue, 6 Oct 2020 20:37:50 +0000 (+0100) Subject: examples/pipeline: fix files for table update X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=64eaee23abb1cdc584dfe6f494c8220293106f63;p=dpdk.git examples/pipeline: fix files for table update Coverity issue: 362744, 362745, 362882 Fixes: 5074e1d551 ("examples/pipeline: add configuration commands") Signed-off-by: Cristian Dumitrescu --- diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c index 9f3d87a3c1..76a58ee283 100644 --- a/examples/pipeline/cli.c +++ b/examples/pipeline/cli.c @@ -836,8 +836,8 @@ cmd_pipeline_table_update(char **tokens, } if (strcmp(file_name_delete, "none")) { - file_add = fopen(file_name_delete, "r"); - if (!file_add) { + file_delete = fopen(file_name_delete, "r"); + if (!file_delete) { snprintf(out, out_size, "Cannot open file %s", file_name_delete); goto error; @@ -845,8 +845,8 @@ cmd_pipeline_table_update(char **tokens, } if (strcmp(file_name_default, "none")) { - file_add = fopen(file_name_default, "r"); - if (!file_add) { + file_default = fopen(file_name_default, "r"); + if (!file_default) { snprintf(out, out_size, "Cannot open file %s", file_name_default); goto error;