From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B876A04C0; Tue, 6 Oct 2020 22:38:18 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42B032C28; Tue, 6 Oct 2020 22:38:04 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 04EEF2952 for ; Tue, 6 Oct 2020 22:37:59 +0200 (CEST) IronPort-SDR: yP/zudVOo9Kh65GsQBQbmgDfW2n8MBqj1Bl7YWP6cPRIRV7M2ARdpC9k+wBqF4HgMtav064YLF STqkueG44jHg== X-IronPort-AV: E=McAfee;i="6000,8403,9766"; a="151607365" X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="151607365" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 13:37:58 -0700 IronPort-SDR: iZPFQsP+83JtMnnLkRJl7NjOeYJAgWsb2sHXxR/L466BcFcvMPr34sKNSGxQ+qKFqK6sNAh1LU g0aDw6BbbVyg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,343,1596524400"; d="scan'208";a="460985787" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by orsmga004.jf.intel.com with ESMTP; 06 Oct 2020 13:37:57 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Tue, 6 Oct 2020 21:37:50 +0100 Message-Id: <20201006203755.90779-2-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201006203755.90779-1-cristian.dumitrescu@intel.com> References: <20201006203755.90779-1-cristian.dumitrescu@intel.com> Subject: [dpdk-dev] [PATCH 2/7] examples/pipeline: fix files for table update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 5074e1d551 ("examples/pipeline: add configuration commands") Coverity issues: 362744, 362745, 362882 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 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