summaryrefslogtreecommitdiffstats
path: root/src/vlib/node_cli.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-03-08 19:08:56 -0500
committerOle Trøan <otroan@employees.org>2017-03-09 19:07:17 +0000
commit80f54e20270ed0628ee725e3e3c515731a0188f2 (patch)
treefa06d939942af6f5126ee645c38cb787814bfb6f /src/vlib/node_cli.c
parentb3b2de71ceea0cc7ce18f89cc8180ed4a42e355d (diff)
vlib_mains == 0 special cases be gone
Clean up spurious binary API client link dependency on libvlib.so, which managed to hide behind vlib_mains == 0 checks reached by VLIB_xxx_FUNCTION macros. Change-Id: I5df1f8ab07dca1944250e643ccf06e60a8462325 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/node_cli.c')
-rw-r--r--src/vlib/node_cli.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/src/vlib/node_cli.c b/src/vlib/node_cli.c
index 05d0f0b5a95..62ab2e64bc4 100644
--- a/src/vlib/node_cli.c
+++ b/src/vlib/node_cli.c
@@ -248,16 +248,11 @@ show_node_runtime (vlib_main_t * vm,
if (unformat (input, "max") || unformat (input, "m"))
max = 1;
- if (vec_len (vlib_mains) == 0)
- vec_add1 (stat_vms, vm);
- else
+ for (i = 0; i < vec_len (vlib_mains); i++)
{
- for (i = 0; i < vec_len (vlib_mains); i++)
- {
- stat_vm = vlib_mains[i];
- if (stat_vm)
- vec_add1 (stat_vms, stat_vm);
- }
+ stat_vm = vlib_mains[i];
+ if (stat_vm)
+ vec_add1 (stat_vms, stat_vm);
}
/*
@@ -331,7 +326,7 @@ show_node_runtime (vlib_main_t * vm,
}
}
- if (vec_len (vlib_mains))
+ if (vec_len (vlib_mains) > 1)
{
vlib_worker_thread_t *w = vlib_worker_threads + j;
if (j > 0)
@@ -404,16 +399,11 @@ clear_node_runtime (vlib_main_t * vm,
vlib_main_t **stat_vms = 0, *stat_vm;
vlib_node_runtime_t *r;
- if (vec_len (vlib_mains) == 0)
- vec_add1 (stat_vms, vm);
- else
+ for (i = 0; i < vec_len (vlib_mains); i++)
{
- for (i = 0; i < vec_len (vlib_mains); i++)
- {
- stat_vm = vlib_mains[i];
- if (stat_vm)
- vec_add1 (stat_vms, stat_vm);
- }
+ stat_vm = vlib_mains[i];
+ if (stat_vm)
+ vec_add1 (stat_vms, stat_vm);
}
vlib_worker_thread_barrier_sync (vm);