From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fan Zhang Subject: [PATCH] lib/pipeline: fix logically dead code Date: Mon, 5 Nov 2018 12:27:02 +0000 Message-ID: <20181105122702.33460-1-roy.fan.zhang@intel.com> Cc: cristian.dumitrescu@intel.com To: dev@dpdk.org 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) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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