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 C48C5A0350; Wed, 6 May 2020 11:02:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 28D701D675; Wed, 6 May 2020 11:02:48 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A7B331D64E for ; Wed, 6 May 2020 11:02:46 +0200 (CEST) IronPort-SDR: ldzdlNHNJMrG3T7q68LrTxlsKC2QrTw/aH9u/+LrdpLKqoWvO9RUd28Zp6QhE2K4L6PLpNZwDi cE5260bhnEUg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2020 02:02:45 -0700 IronPort-SDR: ynCBS0CgVQIsXRrOZGhLhQZZ4duI3xenMRN3Pd8UODyMP2CK9AGLMIgZEmqAs54hyVLtBg0/O/ +kOd6HhElWPQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,358,1583222400"; d="scan'208";a="407169599" Received: from silpixa00399416.ir.intel.com (HELO silpixa00399416.ger.corp.intel.com) ([10.237.223.137]) by orsmga004.jf.intel.com with ESMTP; 06 May 2020 02: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 10:02:40 +0100 Message-Id: <20200506090240.19214-1-praveen.shetty@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] examples/ipsec-secgw: resolve coverity issue 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. But passing negative number to strerror is causing the coverity issue. 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 coverity issue. Coverity issue: 357691 Fixes: 6738c0a95695 ("examples/ipsec-secgw: support flow director") Cc: praveen.shetty@intel.com Signed-off-by: Praveen Shetty --- 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