From patchwork Fri Dec 11 11:29:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fan Zhang X-Patchwork-Id: 9492 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id A73448E92; Fri, 11 Dec 2015 12:29:22 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 50FB28E83 for ; Fri, 11 Dec 2015 12:29:17 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 11 Dec 2015 03:29:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,413,1444719600"; d="scan'208";a="616378422" Received: from sie-lab-212-033.ir.intel.com (HELO silpixa00383881.ir.intel.com) ([10.237.212.33]) by FMSMGA003.fm.intel.com with ESMTP; 11 Dec 2015 03:29:16 -0800 From: Fan Zhang To: dev@dpdk.org Date: Fri, 11 Dec 2015 11:29:11 +0000 Message-Id: <1449833351-10011-6-git-send-email-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1449833351-10011-1-git-send-email-roy.fan.zhang@intel.com> References: <1449833351-10011-1-git-send-email-roy.fan.zhang@intel.com> Subject: [dpdk-dev] [PATCH] example/ip_pipeline: fix value overwrite X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Coverity issue: 107136 Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax") Signed-off-by: Fan Zhang Acked-by: Cristian Dumitrescu Acked-by: John McNamara --- examples/ip_pipeline/config_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/ip_pipeline/config_parse.c b/examples/ip_pipeline/config_parse.c index 67e58c9..4e194d6 100644 --- a/examples/ip_pipeline/config_parse.c +++ b/examples/ip_pipeline/config_parse.c @@ -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);