pipeline: fix unused variable
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>
Tue, 6 Oct 2020 20:37:54 +0000 (21:37 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 8 Oct 2020 13:09:28 +0000 (15:09 +0200)
Coverity issue: 362855
Fixes: 75634474ca ("pipeline: add SWX instruction verifier")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_pipeline/rte_swx_pipeline.c

index 8b7ff56..a4d072d 100644 (file)
@@ -5671,7 +5671,7 @@ instr_verify(struct rte_swx_pipeline *p __rte_unused,
                for (i = 0; i < n_instructions; i++) {
                        type = instr[i].type;
 
-                       if (instr[i].type == INSTR_TX)
+                       if (type == INSTR_TX)
                                break;
                }
                CHECK(i < n_instructions, EINVAL);