misc: move to new pool_foreach macros
Type: refactor
Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772
Signed-off-by: Damjan Marion <damarion@cisco.com>
diff --git a/src/vlibmemory/memory_api.c b/src/vlibmemory/memory_api.c
index 18a87b3..f229ecf 100644
--- a/src/vlibmemory/memory_api.c
+++ b/src/vlibmemory/memory_api.c
@@ -583,10 +583,10 @@
vec_reset_length (confused_indices);
/* *INDENT-OFF* */
- pool_foreach (regpp, am->vl_clients, ({
+ pool_foreach (regpp, am->vl_clients) {
vl_mem_send_client_keepalive_w_reg (am, now, regpp, &dead_indices,
&confused_indices);
- }));
+ }
/* *INDENT-ON* */
/* This should "never happen," but if it does, fix it... */
@@ -893,15 +893,15 @@
/* For horizontal scaling, add a hash table... */
/* *INDENT-OFF* */
- pool_foreach (regpp, am->vl_clients,
- ({
+ pool_foreach (regpp, am->vl_clients)
+ {
regp = *regpp;
if (regp && regp->vlib_rp == vlib_rp)
{
vlib_cli_output (vm, "%s segment rings:", regp->name);
goto found;
}
- }));
+ }
vlib_cli_output (vm, "regp %llx not found?", regp);
continue;
/* *INDENT-ON* */
diff --git a/src/vlibmemory/socket_api.c b/src/vlibmemory/socket_api.c
index d724164..a5fb86b 100644
--- a/src/vlibmemory/socket_api.c
+++ b/src/vlibmemory/socket_api.c
@@ -85,13 +85,13 @@
vlib_cli_output (vm, "Socket clients");
vlib_cli_output (vm, "%20s %8s", "Name", "Fildesc");
/* *INDENT-OFF* */
- pool_foreach (reg, sm->registration_pool,
- ({
+ pool_foreach (reg, sm->registration_pool)
+ {
if (reg->registration_type == REGISTRATION_TYPE_SOCKET_SERVER) {
f = vl_api_registration_file (reg);
vlib_cli_output (vm, "%20s %8d", reg->name, f->file_descriptor);
}
- }));
+ }
/* *INDENT-ON* */
}
@@ -784,11 +784,11 @@
{
u32 index;
/* *INDENT-OFF* */
- pool_foreach (rp, sm->registration_pool, ({
+ pool_foreach (rp, sm->registration_pool) {
vl_api_registration_del_file (rp);
index = rp->vl_api_registration_pool_index;
vl_socket_free_registration_index (index);
- }));
+ }
/* *INDENT-ON* */
}
diff --git a/src/vlibmemory/vlib_api_cli.c b/src/vlibmemory/vlib_api_cli.c
index 5a06c65..aca9aac 100644
--- a/src/vlibmemory/vlib_api_cli.c
+++ b/src/vlibmemory/vlib_api_cli.c
@@ -111,8 +111,8 @@
"Name", "PID", "Queue Length", "Queue VA", "Health");
/* *INDENT-OFF* */
- pool_foreach (regpp, am->vl_clients,
- ({
+ pool_foreach (regpp, am->vl_clients)
+ {
regp = *regpp;
if (regp)
@@ -134,7 +134,7 @@
regpp - am->vl_clients);
vec_add1 (confused_indices, regpp - am->vl_clients);
}
- }));
+ }
/* *INDENT-ON* */
/* This should "never happen," but if it does, fix it... */