From f615ecb96d2793f4b22680dc0ccafa8ce51c6ebe Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Thu, 25 Nov 2021 17:49:25 +0200 Subject: tools: Convert vty_out to vty_json for JSON Signed-off-by: Donatas Abraitis --- tools/coccinelle/vty_json.cocci | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tools/coccinelle/vty_json.cocci (limited to 'tools/coccinelle') diff --git a/tools/coccinelle/vty_json.cocci b/tools/coccinelle/vty_json.cocci new file mode 100644 index 000000000..481dac540 --- /dev/null +++ b/tools/coccinelle/vty_json.cocci @@ -0,0 +1,9 @@ +@@ +identifier vty; +identifier json; +@@ + +-vty_out(vty, "%s\n", json_object_to_json_string_ext(json, ...)); +... +-json_object_free(json); ++vty_json(vty, json); -- cgit v1.2.3