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/mactime | |
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/mactime')
-rw-r--r-- | src/plugins/mactime/builtins.c | 6 | ||||
-rw-r--r-- | src/plugins/mactime/mactime.c | 12 | ||||
-rw-r--r-- | src/plugins/mactime/mactime_test.c | 6 | ||||
-rw-r--r-- | src/plugins/mactime/mactime_top.c | 12 |
4 files changed, 18 insertions, 18 deletions
diff --git a/src/plugins/mactime/builtins.c b/src/plugins/mactime/builtins.c index 1525ab66ae7..d7fd7a0b32b 100644 --- a/src/plugins/mactime/builtins.c +++ b/src/plugins/mactime/builtins.c @@ -43,10 +43,10 @@ handle_get_mactime (http_builtin_method_type_t reqtype, mm->sunday_midnight = clib_timebase_find_sunday_midnight (now); /* *INDENT-OFF* */ - pool_foreach (dp, mm->devices, - ({ + pool_foreach (dp, mm->devices) + { vec_add1 (pool_indices, dp - mm->devices); - })); + } /* *INDENT-ON* */ s = format (s, "{%smactime%s: [\n", q, q); diff --git a/src/plugins/mactime/mactime.c b/src/plugins/mactime/mactime.c index 66df70bca2f..a2219bebe9a 100644 --- a/src/plugins/mactime/mactime.c +++ b/src/plugins/mactime/mactime.c @@ -195,8 +195,8 @@ vl_api_mactime_dump_t_handler (vl_api_mactime_dump_t * mp) } /* *INDENT-OFF* */ - pool_foreach (dev, mm->devices, - ({ + pool_foreach (dev, mm->devices) + { message_size = sizeof(*ep) + vec_len(dev->device_name) + vec_len(dev->ranges) * sizeof(ep->ranges[0]); @@ -230,7 +230,7 @@ vl_api_mactime_dump_t_handler (vl_api_mactime_dump_t * mp) name_len); ep->device_name [ARRAY_LEN(ep->device_name) -1] = 0; vl_api_send_msg (rp, (u8 *)ep); - })); + } /* *INDENT-OFF* */ send_reply: @@ -578,10 +578,10 @@ show_mactime_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "Time now: %U", format_clib_timebase_time, now); /* *INDENT-OFF* */ - pool_foreach (dp, mm->devices, - ({ + pool_foreach (dp, mm->devices) + { vec_add1 (pool_indices, dp - mm->devices); - })); + } /* *INDENT-ON* */ vlib_cli_output (vm, "%-15s %18s %14s %10s %11s %13s", diff --git a/src/plugins/mactime/mactime_test.c b/src/plugins/mactime/mactime_test.c index b47cc211435..67655ccefad 100644 --- a/src/plugins/mactime/mactime_test.c +++ b/src/plugins/mactime/mactime_test.c @@ -282,10 +282,10 @@ api_mactime_dump (vat_main_t * vam) fformat (vam->ofp, "%U", format_device, 0 /* header */ , 0 /* verbose */ ); /* *INDENT-OFF* */ - pool_foreach (dev, tm->devices, - ({ + pool_foreach (dev, tm->devices) + { fformat (vam->ofp, "%U", format_device, dev, verbose); - })); + } /* *INDENT-ON* */ return ret; diff --git a/src/plugins/mactime/mactime_top.c b/src/plugins/mactime/mactime_top.c index 473cc5b5c0e..72d1964f32f 100644 --- a/src/plugins/mactime/mactime_top.c +++ b/src/plugins/mactime/mactime_top.c @@ -196,10 +196,10 @@ scrape_stats_segment (mt_main_t * mm) vec_reset_length (pool_indices); /* *INDENT-OFF* */ - pool_foreach (dev, mm->devices, - ({ + pool_foreach (dev, mm->devices) + { vec_add1 (pool_indices, dev->pool_index); - })); + } /* *INDENT-ON* */ /* Nothing to do... */ @@ -445,10 +445,10 @@ print_device_table (mt_main_t * mm) fformat (stdout, "%U", format_device, 0 /* header */ , 0 /* verbose */ ); /* *INDENT-OFF* */ - pool_foreach (dev, mm->devices, - ({ + pool_foreach (dev, mm->devices) + { fformat (stdout, "%U", format_device, dev, 0 /* verbose */); - })); + } /* *INDENT-ON* */ } |