[RFC,5/5] pipeline: remove dead code

Message ID 20181106214901.1392-6-stephen@networkplumber.org
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • more Coverity related bug fixes
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Nov. 6, 2018, 9:49 p.m.
Coverity detected dead code since pointer into a global
array can never be NULL.

Coverity issue: 323523
Fixes: 96303217a606 ("pipeline: add symmetric crypto table action")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_pipeline/rte_table_action.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Thomas Monjalon Nov. 18, 2018, 3:07 p.m. | #1
+Cc Cristian

06/11/2018 22:49, Stephen Hemminger:
> Coverity detected dead code since pointer into a global
> array can never be NULL.
> 
> Coverity issue: 323523
> Fixes: 96303217a606 ("pipeline: add symmetric crypto table action")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Patch

diff --git a/lib/librte_pipeline/rte_table_action.c b/lib/librte_pipeline/rte_table_action.c
index 537e6593e4a0..69ab41a7ab2d 100644
--- a/lib/librte_pipeline/rte_table_action.c
+++ b/lib/librte_pipeline/rte_table_action.c
@@ -1696,8 +1696,6 @@  get_block_size(const struct rte_crypto_sym_xform *xform, uint8_t cdev_id)
 
 	for (i = 0;; i++) {
 		cap = &dev_info.capabilities[i];
-		if (!cap)
-			break;
 
 		if (cap->sym.xform_type != xform->type)
 			continue;