aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2
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/l2
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/l2')
-rw-r--r--src/vnet/l2/l2_api.c12
-rw-r--r--src/vnet/l2/l2_input.c2
-rw-r--r--src/vnet/l2/l2_rw.c4
-rw-r--r--src/vnet/l2/l2_xcrw.c6
4 files changed, 12 insertions, 12 deletions
diff --git a/src/vnet/l2/l2_api.c b/src/vnet/l2/l2_api.c
index 746c7fdf2a2..2c2f480b35f 100644
--- a/src/vnet/l2/l2_api.c
+++ b/src/vnet/l2/l2_api.c
@@ -109,13 +109,13 @@ vl_api_l2_xconnect_dump_t_handler (vl_api_l2_xconnect_dump_t * mp)
return;
/* *INDENT-OFF* */
- pool_foreach (swif, im->sw_interfaces,
- ({
+ pool_foreach (swif, im->sw_interfaces)
+ {
config = vec_elt_at_index (l2im->configs, swif->sw_if_index);
if (l2_input_is_xconnect(config))
send_l2_xconnect_details (reg, mp->context, swif->sw_if_index,
config->output_sw_if_index);
- }));
+ }
/* *INDENT-ON* */
}
@@ -1112,8 +1112,8 @@ l2_arp_term_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
last = now;
/* *INDENT-OFF* */
- pool_foreach(reg, vpe_api_main.l2_arp_term_events_registrations,
- ({
+ pool_foreach (reg, vpe_api_main.l2_arp_term_events_registrations)
+ {
vl_api_registration_t *vl_reg;
vl_reg = vl_api_client_index_to_registration (reg->client_index);
ALWAYS_ASSERT (vl_reg != NULL);
@@ -1133,7 +1133,7 @@ l2_arp_term_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
mac_address_encode(&event->mac, vevent->mac);
vl_api_send_msg (vl_reg, (u8 *) vevent);
}
- }));
+ }
/* *INDENT-ON* */
}
vec_reset_length (l2am->publish_events);
diff --git a/src/vnet/l2/l2_input.c b/src/vnet/l2/l2_input.c
index 9dc452e1558..de22cef600e 100644
--- a/src/vnet/l2/l2_input.c
+++ b/src/vnet/l2/l2_input.c
@@ -811,7 +811,7 @@ show_int_mode (vlib_main_t * vm,
sis = vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
_vec_len (sis) = 0;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces, ({ vec_add1 (sis, si[0]); }));
+ pool_foreach (si, im->sw_interfaces) { vec_add1 (sis, si[0]); }
/* *INDENT-ON* */
}
diff --git a/src/vnet/l2/l2_rw.c b/src/vnet/l2/l2_rw.c
index 3160e65e40d..59b7de91279 100644
--- a/src/vnet/l2/l2_rw.c
+++ b/src/vnet/l2/l2_rw.c
@@ -532,9 +532,9 @@ l2_rw_show_entries_cli_fn (vlib_main_t * vm,
vlib_cli_output (vm, "No entries\n");
/* *INDENT-OFF* */
- pool_foreach(e, rw->entries, {
+ pool_foreach (e, rw->entries) {
vlib_cli_output (vm, "%U\n", format_l2_rw_entry, e);
- });
+ }
/* *INDENT-ON* */
return 0;
}
diff --git a/src/vnet/l2/l2_xcrw.c b/src/vnet/l2/l2_xcrw.c
index 540ce3f9c26..942cd118d3d 100644
--- a/src/vnet/l2/l2_xcrw.c
+++ b/src/vnet/l2/l2_xcrw.c
@@ -569,10 +569,10 @@ show_l2xcrw_command_fn (vlib_main_t * vm,
vlib_cli_output (vm, "%U", format_l2xcrw, 0, 0);
/* *INDENT-OFF* */
- pool_foreach (t, xcm->tunnels,
- ({
+ pool_foreach (t, xcm->tunnels)
+ {
vlib_cli_output (vm, "%U", format_l2xcrw, vnm, t);
- }));
+ }
/* *INDENT-ON* */
return 0;