diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-08-27 10:58:59 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-09-25 22:08:43 +0000 |
commit | 53616f5caf2e968132ae0662413bcdd227959ad1 (patch) | |
tree | 78d15700c62c64deaf2e17f40fb452f746c816df | |
parent | 4fffc536f4beb6b7cc3c68835f4fbde45366a9ab (diff) |
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 <bganne@cisco.com>
-rw-r--r-- | src/plugins/rdma/output.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |