summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_cli.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/vnet/session/session_cli.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/vnet/session/session_cli.c')
-rw-r--r--src/vnet/session/session_cli.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/session/session_cli.c b/src/vnet/session/session_cli.c
index ade76ef4e60..a9197547501 100644
--- a/src/vnet/session/session_cli.c
+++ b/src/vnet/session/session_cli.c
@@ -337,14 +337,14 @@ session_cli_show_all_sessions (vlib_main_t * vm, int verbose)
n_closed = 0;
/* *INDENT-OFF* */
- pool_foreach(s, pool, ({
+ pool_foreach (s, pool) {
if (s->session_state >= SESSION_STATE_TRANSPORT_DELETED)
{
n_closed += 1;
continue;
}
vlib_cli_output (vm, "%U", format_session, s, verbose);
- }));
+ }
/* *INDENT-ON* */
if (!n_closed)
@@ -622,7 +622,7 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
"App");
/* *INDENT-OFF* */
- pool_foreach (s, smm->wrk[0].sessions, ({
+ pool_foreach (s, smm->wrk[0].sessions) {
if (s->session_state != SESSION_STATE_LISTENING
|| s->session_type != sst)
continue;
@@ -630,7 +630,7 @@ show_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
app_name = application_name_from_index (app_wrk->app_index);
vlib_cli_output (vm, "%U%-25v%", format_session, s, 0,
app_name);
- }));
+ }
/* *INDENT-ON* */
goto done;
}
@@ -727,9 +727,9 @@ clear_session_command_fn (vlib_main_t * vm, unformat_input_t * input,
/* *INDENT-OFF* */
vec_foreach (wrk, smm->wrk)
{
- pool_foreach(session, wrk->sessions, ({
+ pool_foreach (session, wrk->sessions) {
clear_session (session);
- }));
+ }
};
/* *INDENT-ON* */
}