From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 477BA2C52 for ; Mon, 5 Nov 2018 13:27:05 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2018 04:27:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,467,1534834800"; d="scan'208";a="106010040" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.54]) by orsmga002.jf.intel.com with ESMTP; 05 Nov 2018 04:27:03 -0800 From: Fan Zhang To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com Date: Mon, 5 Nov 2018 12:27:02 +0000 Message-Id: <20181105122702.33460-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] lib/pipeline: fix logically dead code 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: , X-List-Received-Date: Mon, 05 Nov 2018 12:27:05 -0000 This patches fixes the coverity issue of logically dead code. Fixes: 96303217a606 ("pipeline: add symmetric crypto table action") Coverity issue: 323523 Signed-off-by: Fan Zhang --- lib/librte_pipeline/rte_table_action.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/librte_pipeline/rte_table_action.c b/lib/librte_pipeline/rte_table_action.c index 537e6593e..7c7c8dd82 100644 --- a/lib/librte_pipeline/rte_table_action.c +++ b/lib/librte_pipeline/rte_table_action.c @@ -1694,10 +1694,9 @@ get_block_size(const struct rte_crypto_sym_xform *xform, uint8_t cdev_id) rte_cryptodev_info_get(cdev_id, &dev_info); - for (i = 0;; i++) { + for (i = 0; dev_info.capabilities[i].op != RTE_CRYPTO_OP_TYPE_UNDEFINED; + i++) { cap = &dev_info.capabilities[i]; - if (!cap) - break; if (cap->sym.xform_type != xform->type) continue; -- 2.13.6