diff options
author | Damjan Marion <damarion@cisco.com> | 2020-12-13 21:47:40 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-12-14 12:14:21 +0000 |
commit | b2c31b685fd2cf28436ca32bc93e23eb24c74878 (patch) | |
tree | dc0a1b1ff784445b2cbb0f9b2c07b5bcb4f5a5d0 /src/plugins/cnat/cnat_client.c | |
parent | 62c25abaa3e93be5815172d391295a6ab0390122 (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/cnat/cnat_client.c')
-rw-r--r-- | src/plugins/cnat/cnat_client.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/cnat/cnat_client.c b/src/plugins/cnat/cnat_client.c index 1074fccc97f..534813c1564 100644 --- a/src/plugins/cnat/cnat_client.c +++ b/src/plugins/cnat/cnat_client.c @@ -84,7 +84,7 @@ cnat_client_throttle_pool_process () vec_reset_length (del_vec); clib_spinlock_lock (&cnat_client_db.throttle_pool_lock[i]); /* *INDENT-OFF* */ - pool_foreach(addr, cnat_client_db.throttle_pool[i], ({ + pool_foreach (addr, cnat_client_db.throttle_pool[i]) { cc = (AF_IP4 == addr->version ? cnat_client_ip4_find (&ip_addr_v4(addr)) : cnat_client_ip6_find (&ip_addr_v6(addr))); @@ -94,7 +94,7 @@ cnat_client_throttle_pool_process () cnat_client_cnt_session (cc); vec_add1(del_vec, addr - cnat_client_db.throttle_pool[i]); } - })); + } /* *INDENT-ON* */ vec_foreach (ai, del_vec) { @@ -301,9 +301,8 @@ cnat_client_show (vlib_main_t * vm, if (INDEX_INVALID == cci) { /* *INDENT-OFF* */ - pool_foreach_index(cci, cnat_client_pool, ({ + pool_foreach_index (cci, cnat_client_pool) vlib_cli_output(vm, "%U", format_cnat_client, cci, 0); - })) /* *INDENT-ON* */ vlib_cli_output (vm, "%d clients", pool_elts (cnat_client_pool)); |