From b2c31b685fd2cf28436ca32bc93e23eb24c74878 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Sun, 13 Dec 2020 21:47:40 +0100 Subject: misc: move to new pool_foreach macros Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion --- src/plugins/l2tp/l2tp.c | 18 +++++++++--------- src/plugins/l2tp/l2tp_api.c | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/plugins/l2tp') diff --git a/src/plugins/l2tp/l2tp.c b/src/plugins/l2tp/l2tp.c index 242f4323e37..08fa6d1e60b 100644 --- a/src/plugins/l2tp/l2tp.c +++ b/src/plugins/l2tp/l2tp.c @@ -130,10 +130,10 @@ show_l2tp_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "L2tp session lookup on %s", keystr); /* *INDENT-OFF* */ - pool_foreach (session, lm->sessions, - ({ + pool_foreach (session, lm->sessions) + { vlib_cli_output (vm, "%U", format_l2t_session, session); - })); + } /* *INDENT-ON* */ } @@ -160,8 +160,8 @@ test_counters_command_fn (vlib_main_t * vm, u32 thread_index = vm->thread_index; /* *INDENT-OFF* */ - pool_foreach (session, lm->sessions, - ({ + pool_foreach (session, lm->sessions) + { session_index = session - lm->sessions; counter_index = session_index_to_counter_index (session_index, @@ -176,7 +176,7 @@ test_counters_command_fn (vlib_main_t * vm, 1/*pkt*/, 2222 /*bytes*/); nincr++; - })); + } /* *INDENT-ON* */ vlib_cli_output (vm, "Incremented %d active counters\n", nincr); @@ -202,8 +202,8 @@ clear_counters_command_fn (vlib_main_t * vm, u32 nincr = 0; /* *INDENT-OFF* */ - pool_foreach (session, lm->sessions, - ({ + pool_foreach (session, lm->sessions) + { session_index = session - lm->sessions; counter_index = session_index_to_counter_index (session_index, @@ -211,7 +211,7 @@ clear_counters_command_fn (vlib_main_t * vm, vlib_zero_combined_counter (&lm->counter_main, counter_index); vlib_zero_combined_counter (&lm->counter_main, counter_index+1); nincr++; - })); + } /* *INDENT-ON* */ vlib_cli_output (vm, "Cleared %d active counters\n", nincr); diff --git a/src/plugins/l2tp/l2tp_api.c b/src/plugins/l2tp/l2tp_api.c index fb675ddff5e..ba9d2681b35 100644 --- a/src/plugins/l2tp/l2tp_api.c +++ b/src/plugins/l2tp/l2tp_api.c @@ -90,10 +90,10 @@ vl_api_sw_if_l2tpv3_tunnel_dump_t_handler (vl_api_sw_if_l2tpv3_tunnel_dump_t * return; /* *INDENT-OFF* */ - pool_foreach (session, lm->sessions, - ({ + pool_foreach (session, lm->sessions) + { send_sw_if_l2tpv3_tunnel_details (am, reg, session, lm, mp->context); - })); + } /* *INDENT-ON* */ } -- cgit 1.2.3-korg