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 3E4EDA034F; Wed, 6 May 2020 13:02:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99A451D92E; Wed, 6 May 2020 13:02:48 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id BB3C91D92B for ; Wed, 6 May 2020 13:02:46 +0200 (CEST) IronPort-SDR: 5TKD4ovmu1i8hH/S+PYmj8bCuX00grI+tBNngQMDZj5Etq6RDpAarNnIfXQ+bNe5kZyCypk5UI yo94+mH6JtdA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 04:02:45 -0700 IronPort-SDR: KzW9zo9iCn4WqOlgO6pHROApF2PAT28yzinnpENbQZHzlUxG81pk0D6zpwLIQ0xZpP2IxrWD59 b5jk6K93yHpQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,358,1583222400"; d="scan'208";a="461400079" Received: from silpixa00399416.ir.intel.com (HELO silpixa00399416.ger.corp.intel.com) ([10.237.223.137]) by fmsmga005.fm.intel.com with ESMTP; 06 May 2020 04:02:43 -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 12:02:41 +0100 Message-Id: <20200506110241.21118-1-praveen.shetty@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200506103752.20478-1-praveen.shetty@intel.com> References: <20200506103752.20478-1-praveen.shetty@intel.com> Subject: [dpdk-dev] [PATCH v3] 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 display 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 --- v3 changes: fixed typo in 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