From: Steven Luong Date: Tue, 5 Mar 2019 23:29:22 +0000 (-0800) Subject: vlib: coverity woes X-Git-Tag: v19.04-rc1~320 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F42%2F18042%2F2;p=vpp.git vlib: coverity woes Remove logically dead code to keep coverity from complaining Change-Id: If27d6684d19ab3c8886732a67922c86e5f0b3554 Signed-off-by: Steven Luong --- diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c index 0e972caadc9..3b0b5d78349 100644 --- a/src/vlib/buffer.c +++ b/src/vlib/buffer.c @@ -746,8 +746,7 @@ buffer_get_by_index (vlib_buffer_main_t * bm, u32 index) if (!bm->buffer_pools || vec_len (bm->buffer_pools) < index) return 0; bp = vec_elt_at_index (bm->buffer_pools, index); - if (!bp) - return 0; + return bp; }