X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvat%2Fmain.c;h=295ccec2515177888e191eb3495d597ae1be24d0;hb=e26c81fc80d1ce9a8746ebf4009149849b04f60f;hp=4357114376ddcd9ba9b9f21c1c3368b7b98f1b37;hpb=ffe9d21b07ce4b607fd9a774df04f9f1f38eb197;p=vpp.git diff --git a/src/vat/main.c b/src/vat/main.c index 4357114376d..295ccec2515 100644 --- a/src/vat/main.c +++ b/src/vat/main.c @@ -26,17 +26,6 @@ vat_suspend (vlib_main_t * vm, f64 interval) /* do nothing in the standalone version, just return */ } -void -fformat_append_cr (FILE * ofp, const char *fmt, ...) -{ - va_list va; - - va_start (va, fmt); - (void) va_fformat (ofp, (char *) fmt, &va); - va_end (va); - fformat (ofp, "\n"); -} - int connect_to_vpe (char *name) { @@ -264,7 +253,7 @@ setup_signal_handlers (void) for (i = 1; i < 32; i++) { - memset (&sa, 0, sizeof (sa)); + clib_memset (&sa, 0, sizeof (sa)); sa.sa_sigaction = (void *) signal_handler; sa.sa_flags = SA_SIGINFO; @@ -305,18 +294,10 @@ main (int argc, char **argv) u8 *this_input_file; u8 interactive = 1; u8 json_output = 0; - u8 *heap; - mheap_t *h; int i; f64 timeout; - clib_mem_init (0, 128 << 20); - - heap = clib_mem_get_per_cpu_heap (); - h = mheap_header (heap); - - /* make the main heap thread-safe */ - h->flags |= MHEAP_FLAG_THREAD_SAFE; + clib_mem_init_thread_safe (0, 128 << 20); clib_macro_init (&vam->macro_main); clib_macro_add_builtin (&vam->macro_main, "current_file",