From: Benoît Ganne Date: Tue, 27 Aug 2019 08:58:59 +0000 (+0200) Subject: rdma: fix pending packets check on tx X-Git-Tag: v20.05-rc0~927 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=1ec093fe7a0c37cb5b8a84fdf5ffbd243880980f;p=vpp.git rdma: fix pending packets check on tx 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 --- 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);