summaryrefslogtreecommitdiffstats
path: root/src/plugins/l2tp/l2tp.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-12-13 21:47:40 +0100
committerDave Barach <openvpp@barachs.net>2020-12-14 12:14:21 +0000
commitb2c31b685fd2cf28436ca32bc93e23eb24c74878 (patch)
treedc0a1b1ff784445b2cbb0f9b2c07b5bcb4f5a5d0 /src/plugins/l2tp/l2tp.c
parent62c25abaa3e93be5815172d391295a6ab0390122 (diff)
misc: move to new pool_foreach macros
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/l2tp/l2tp.c')
-rw-r--r--src/plugins/l2tp/l2tp.c18
1 files changed, 9 insertions, 9 deletions
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);