summaryrefslogtreecommitdiffstats
path: root/tools/coccinelle
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2022-01-31 14:34:24 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2022-01-31 14:34:24 +0100
commit1c862c2d9edd37e5a5e0f5a71675f2b8c9906a1d (patch)
tree44769ca0306ff6b4f1271ce2ebd793f916efc8ea /tools/coccinelle
parentMerge pull request #9869 from leonshaw/fix/evpn-queue (diff)
downloadfrr-1c862c2d9edd37e5a5e0f5a71675f2b8c9906a1d.tar.xz
frr-1c862c2d9edd37e5a5e0f5a71675f2b8c9906a1d.zip
tools: Handle new lines for json_object_to_json_string_ext()
Just to handle %s and %s\n. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'tools/coccinelle')
-rw-r--r--tools/coccinelle/vty_json.cocci3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/coccinelle/vty_json.cocci b/tools/coccinelle/vty_json.cocci
index 481dac540..2f2f321ec 100644
--- a/tools/coccinelle/vty_json.cocci
+++ b/tools/coccinelle/vty_json.cocci
@@ -1,9 +1,10 @@
@@
identifier vty;
identifier json;
+constant fmt;
@@
--vty_out(vty, "%s\n", json_object_to_json_string_ext(json, ...));
+-vty_out(vty, fmt, json_object_to_json_string_ext(json, ...));
...
-json_object_free(json);
+vty_json(vty, json);