diff options
Diffstat (limited to 'src/vlib/trace_funcs.h')
-rw-r--r-- | src/vlib/trace_funcs.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vlib/trace_funcs.h b/src/vlib/trace_funcs.h index 98bdb7e0a06..fba55bfc3d3 100644 --- a/src/vlib/trace_funcs.h +++ b/src/vlib/trace_funcs.h @@ -194,15 +194,13 @@ vlib_get_trace_count (vlib_main_t * vm, vlib_node_runtime_t * rt) { vlib_trace_main_t *tm = &vm->trace_main; vlib_trace_node_t *tn; - int n; if (rt->node_index >= vec_len (tm->nodes)) return 0; tn = tm->nodes + rt->node_index; - n = tn->limit - tn->count; - ASSERT (n >= 0); + ASSERT (tn->count <= tn->limit); - return n; + return tn->limit - tn->count; } always_inline void |