[dpdk-dev] [PATCH 2/7] examples/pipeline: fix files for table update

Cristian Dumitrescu cristian.dumitrescu at intel.com
Tue Oct 6 22:37:50 CEST 2020


Fixes: 5074e1d551 ("examples/pipeline: add configuration commands")
Coverity issues: 362744, 362745, 362882

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
---
 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 9f3d87a3c..76a58ee28 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.17.1



More information about the dev mailing list