From 64eaee23abb1cdc584dfe6f494c8220293106f63 Mon Sep 17 00:00:00 2001 From: Cristian Dumitrescu Date: Tue, 6 Oct 2020 21:37:50 +0100 Subject: [PATCH] examples/pipeline: fix files for table update Coverity issue: 362744, 362745, 362882 Fixes: 5074e1d551 ("examples/pipeline: add configuration commands") Signed-off-by: Cristian Dumitrescu --- examples/pipeline/cli.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.20.1