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/vnet/bfd/bfd_udp.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/vnet/bfd/bfd_udp.c')
-rw-r--r-- | src/vnet/bfd/bfd_udp.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/vnet/bfd/bfd_udp.c b/src/vnet/bfd/bfd_udp.c index 2bb4c1d615f..1facb73107f 100644 --- a/src/vnet/bfd/bfd_udp.c +++ b/src/vnet/bfd/bfd_udp.c @@ -1581,17 +1581,19 @@ bfd_udp_sw_if_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_create) if (!is_create) { bfd_session_t *bs; - pool_foreach (bs, bfd_udp_main.bfd_main->sessions, - { - if (bs->transport != BFD_TRANSPORT_UDP4 && - bs->transport != BFD_TRANSPORT_UDP6) - { - continue;} - if (bs->udp.key.sw_if_index != sw_if_index) - { - continue;} - vec_add1 (to_be_freed, bs);} - ); + pool_foreach (bs, bfd_udp_main.bfd_main->sessions) + { + if (bs->transport != BFD_TRANSPORT_UDP4 && + bs->transport != BFD_TRANSPORT_UDP6) + { + continue; + } + if (bs->udp.key.sw_if_index != sw_if_index) + { + continue; + } + vec_add1 (to_be_freed, bs); + } } bfd_session_t **bs; vec_foreach (bs, to_be_freed) |