summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls_vty.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-12-05 21:19:47 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2016-12-08 14:51:08 +0100
commit76c764377c134c9d27508797231fc8873921b2db (patch)
tree44f8eda8ac2143f0626fdaebd99beb04c78402c6 /zebra/zebra_mpls_vty.c
parentMerge branch 'stable/2.0' (diff)
downloadfrr-76c764377c134c9d27508797231fc8873921b2db.tar.xz
frr-76c764377c134c9d27508797231fc8873921b2db.zip
zebra: fix segfault on "show mpls table"
Signed-off-by: Renato Westphal <renato@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_mpls_vty.c')
-rw-r--r--zebra/zebra_mpls_vty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c
index ee7276f31..0185b555f 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;
}