misc: fix coverity warning in ila plugin 00/34100/3
authorKlement Sekera <ksekera@cisco.com>
Wed, 13 Oct 2021 20:06:50 +0000 (22:06 +0200)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 14 Oct 2021 07:12:03 +0000 (07:12 +0000)
Remove non-null check for a pointer which cannot be null to avoid dead
code warning.

Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I5ff40a4f80db7bb0dff9928c90ff757b763902fd

src/plugins/ila/ila.c

index 366abc9..6e062cb 100644 (file)
@@ -365,7 +365,7 @@ ila_ila2sir (vlib_main_t * vm,
            {
              ila_ila2sir_trace_t *tr =
                vlib_add_trace (vm, node, p0, sizeof (*tr));
-             tr->ila_index = ie0 ? (ie0 - ilm->entries) : ~0;
+             tr->ila_index = ie0 - ilm->entries;
              tr->initial_dst = ip60->dst_address;
              tr->adj_index = vnet_buffer (p0)->ip.adj_index[VLIB_TX];
            }