From 76c764377c134c9d27508797231fc8873921b2db Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Mon, 5 Dec 2016 18:19:47 -0200 Subject: [PATCH] zebra: fix segfault on "show mpls table" Signed-off-by: Renato Westphal Signed-off-by: David Lamparter --- zebra/zebra_mpls_vty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c index ee7276f315..0185b555f2 100644 --- a/zebra/zebra_mpls_vty.c +++ b/zebra/zebra_mpls_vty.c @@ -789,10 +789,10 @@ DEFUN (show_mpls_table, JSON_STR) { struct zebra_vrf *zvrf; - u_char use_json = (argv[3]->arg != NULL); + u_char uj = use_json (argc, argv); zvrf = vrf_info_lookup(VRF_DEFAULT); - zebra_mpls_print_lsp_table(vty, zvrf, use_json); + zebra_mpls_print_lsp_table(vty, zvrf, uj); return CMD_SUCCESS; } @@ -807,11 +807,11 @@ DEFUN (show_mpls_table_lsp, { u_int32_t label; struct zebra_vrf *zvrf; - u_char use_json = (argv[4]->arg != NULL); + u_char uj = use_json (argc, argv); zvrf = vrf_info_lookup(VRF_DEFAULT); label = atoi(argv[3]->arg); - zebra_mpls_print_lsp (vty, zvrf, label, use_json); + zebra_mpls_print_lsp (vty, zvrf, label, uj); return CMD_SUCCESS; } -- 2.39.5