diff options
author | Dave Barach <dave@barachs.net> | 2019-02-27 12:36:28 -0500 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-02-27 20:55:46 +0000 |
commit | a2aefef1fd3fc423430531d7e965c9da7d9ec0d5 (patch) | |
tree | ee535683147416f818b2711c801257de4c1dce1f /src/vnet | |
parent | b93452b531f8c4d3fdcd77a3b3c8ede1a511cbc6 (diff) |
VPP-1576: fix Coverity issues
Change-Id: I8b59b2e1c0525abf4b0492e50a7af57df4cd3ce2
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/interface_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c index 6c2345be270..99aa1f110fb 100644 --- a/src/vnet/interface_output.c +++ b/src/vnet/interface_output.c @@ -383,7 +383,8 @@ tso_segment_buffer (vlib_main_t * vm, vnet_interface_per_thread_data_t * ptd, int nloops = 2000; while (total_src_left) { - ASSERT (nloops-- > 0); + if (nloops-- <= 0) + clib_panic ("infinite loop detected"); u16 bytes_to_copy = clib_min (src_left, dst_left); clib_memcpy_fast (dst_ptr, src_ptr, bytes_to_copy); |