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 9AF53A034F; Wed, 6 May 2020 12:38:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E79501D908; Wed, 6 May 2020 12:38:00 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A8AA01D907 for ; Wed, 6 May 2020 12:37:59 +0200 (CEST) IronPort-SDR: lmOOjjOCEfAUP2kpmlNVbK/tpP8bGuLBC0hIcPN+Kt/WMqiMDjOSubJ3kztPGR+2JR3v5zd1o+ 0PQsGroa+83A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 03:37:58 -0700 IronPort-SDR: z0MRsMXJubAsOGC7cc0Tmw2dgO1bwaLpb1aKsmuWmkkvyssrWtDW+Zfe/roST9NsYqQL0bWmWH sGA5FSgAFKKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,358,1583222400"; d="scan'208";a="434841840" Received: from silpixa00399416.ir.intel.com (HELO silpixa00399416.ger.corp.intel.com) ([10.237.223.137]) by orsmga005.jf.intel.com with ESMTP; 06 May 2020 03:37:56 -0700 From: Praveen Shetty To: dev@dpdk.org, declan.doherty@intel.com, akhil.goyal@nxp.com, anoobj@marvell.com Cc: bernard.iremonger@intel.com, konstantin.ananyev@intel.com, praveen.shetty@intel.com Date: Wed, 6 May 2020 11:37:52 +0100 Message-Id: <20200506103752.20478-1-praveen.shetty@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200506090240.19214-1-praveen.shetty@intel.com> References: <20200506090240.19214-1-praveen.shetty@intel.com> Subject: [dpdk-dev] [PATCH v2] examples/ipsec-secgw: fix negative argument passing 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" Function create_ipsec_esp_flow returns a negative number in case of any failure and we are passing this to strerror to dsiplay the error message. But strerror()'s argument cannot be negative. In case of failure, displaying exact error message to console is handled in create_ipsec_esp_flow function.So it is not required to print the error message again using strerror. This patch will remove the unnecessary calling of strerror function to fix the negative argument passing to strerror issue. Coverity issue: 357691 Fixes: 6738c0a95695 ("examples/ipsec-secgw: support flow director") Cc: praveen.shetty@intel.com Signed-off-by: Praveen Shetty Acked-by: Lukasz Wojciechowski --- v2 changes: changed commit headline and rephrased commit message. examples/ipsec-secgw/sa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c index e3a1a5aff..632482176 100644 --- a/examples/ipsec-secgw/sa.c +++ b/examples/ipsec-secgw/sa.c @@ -1223,8 +1223,7 @@ sa_add_rules(struct sa_ctx *sa_ctx, const struct ipsec_sa entries[], rc = create_ipsec_esp_flow(sa); if (rc != 0) RTE_LOG(ERR, IPSEC_ESP, - "create_ipsec_esp_flow() failed %s\n", - strerror(rc)); + "create_ipsec_esp_flow() failed\n"); } print_one_sa_rule(sa, inbound); } -- 2.17.1