From 1ec093fe7a0c37cb5b8a84fdf5ffbd243880980f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Ganne?= Date: Tue, 27 Aug 2019 10:58:59 +0200 Subject: [PATCH] rdma: fix pending packets check on tx MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix coverity CID 203636: Control flow issues (NO_EFFECT). This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "n_left_from >= 0U". Type: fix Fixes: e7e8bf37f100b20acb99957572f1796f648c2853 Change-Id: Ibbf8c82defb12d6d532345eea657d5f300e6a514 Signed-off-by: Benoît Ganne --- src/plugins/rdma/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/rdma/output.c b/src/plugins/rdma/output.c index 0c6848e09cd..a93c7c8c644 100644 --- a/src/plugins/rdma/output.c +++ b/src/plugins/rdma/output.c @@ -182,7 +182,7 @@ VNET_DEVICE_CLASS_TX_FN (rdma_device_class) (vlib_main_t * vm, clib_spinlock_lock_if_init (&txq->lock); - for (i = 0; i < 5 && n_left_from >= 0; i++) + for (i = 0; i < 5 && n_left_from > 0; i++) { u32 n_enq; rdma_device_output_free (vm, txq); -- 2.16.6