aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/error_funcs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/error_funcs.h')
-rw-r--r--src/vlib/error_funcs.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/vlib/error_funcs.h b/src/vlib/error_funcs.h
index 1a3602e92c6..ab281ba2ef8 100644
--- a/src/vlib/error_funcs.h
+++ b/src/vlib/error_funcs.h
@@ -45,10 +45,12 @@
always_inline void
vlib_error_elog_count (vlib_main_t * vm, uword counter, uword increment)
{
- elog_main_t *em = &vm->elog_main;
if (VLIB_ELOG_MAIN_LOOP > 0 && increment > 0)
- elog (em, vec_elt_at_index (vm->error_elog_event_types, counter),
- increment);
+ {
+ elog_main_t *em = &vm->elog_main;
+ elog (em, vec_elt_at_index (vm->error_elog_event_types, counter),
+ increment);
+ }
}
always_inline void