summaryrefslogtreecommitdiffstats
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2021-11-17 12:05:12 +0100
committerDavid Lamparter <equinox@opensourcerouting.org>2021-11-17 16:01:30 +0100
commitad9df66ce244c9e062319970e980cc70f9543f29 (patch)
treed6f951a2adba9376ee0b98a0efa24cab709727db /lib/routemap.c
parentlib: add printfrr to json string helpers (diff)
downloadfrr-ad9df66ce244c9e062319970e980cc70f9543f29.tar.xz
frr-ad9df66ce244c9e062319970e980cc70f9543f29.zip
lib: use vty_json()
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index 6227ebf15..a004e23b8 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -1026,14 +1026,7 @@ static int vty_show_route_map(struct vty *vty, const char *name, bool use_json)
list_delete(&maplist);
}
- if (use_json) {
- vty_out(vty, "%s\n",
- json_object_to_json_string_ext(
- json, JSON_C_TO_STRING_PRETTY));
- json_object_free(json);
- }
-
- return CMD_SUCCESS;
+ return vty_json(vty, json);
}
/* Unused route map details */