summaryrefslogtreecommitdiffstats
path: root/src/vnet/interface_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/interface_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/interface_cli.c')
-rw-r--r--src/vnet/interface_cli.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index fa8d5d2266e..73f70cf5b1b 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -112,8 +112,8 @@ show_or_clear_hw_interfaces (vlib_main_t * vm,
/* Gather interfaces. */
if (vec_len (hw_if_indices) == 0)
- pool_foreach (hi, im->hw_interfaces,
- vec_add1 (hw_if_indices, hi - im->hw_interfaces));
+ pool_foreach (hi, im->hw_interfaces)
+ vec_add1 (hw_if_indices, hi - im->hw_interfaces);
if (verbose < 0)
verbose = 1; /* default to verbose (except bond) */
@@ -395,12 +395,12 @@ show_sw_interfaces (vlib_main_t * vm,
vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
_vec_len (sorted_sis) = 0;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
- ({
+ pool_foreach (si, im->sw_interfaces)
+ {
int visible = vnet_swif_is_api_visible (si);
if (visible)
- vec_add1 (sorted_sis, si[0]);}
- ));
+ vec_add1 (sorted_sis, si[0]);
+ }
/* *INDENT-ON* */
/* Sort by name. */
vec_sort_with_function (sorted_sis, sw_interface_name_compare);
@@ -1207,12 +1207,12 @@ show_interface_sec_mac_addr_fn (vlib_main_t * vm, unformat_input_t * input,
vec_new (vnet_sw_interface_t, pool_elts (im->sw_interfaces));
_vec_len (sorted_sis) = 0;
/* *INDENT-OFF* */
- pool_foreach (si, im->sw_interfaces,
- ({
+ pool_foreach (si, im->sw_interfaces)
+ {
int visible = vnet_swif_is_api_visible (si);
if (visible)
- vec_add1 (sorted_sis, si[0]);}
- ));
+ vec_add1 (sorted_sis, si[0]);
+ }
/* *INDENT-ON* */
/* Sort by name. */
vec_sort_with_function (sorted_sis, sw_interface_name_compare);