lib: fix show route map JSON display (backport #14856) #14893
Merged
frrbot / frrbot
completed
Nov 28, 2023 in 6s
Style and/or linter errors found
Style and/or linter errors found
Details
Thanks for your contribution to FRR!
Click for style suggestions
diff --git a/lib/routemap.c b/lib/routemap.c
index 683943eb6..cc58ece41 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -3138,13 +3138,10 @@ DEFPY (rmap_clear_counters,
}
-DEFUN_NOSH (rmap_show_name,
- rmap_show_name_cmd,
- "show route-map [WORD] [json]",
- SHOW_STR
- "route-map information\n"
- "route-map name\n"
- JSON_STR)
+DEFUN_NOSH(rmap_show_name, rmap_show_name_cmd, "show route-map [WORD] [json]",
+ SHOW_STR
+ "route-map information\n"
+ "route-map name\n" JSON_STR)
{
bool uj = use_json(argc, argv);
int idx = 0;
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index ffc81117a..ea8e1825b 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -3324,13 +3324,11 @@ static void show_route_map_send(const char *route_map, bool json)
vty_out(vty, "}\n");
}
-DEFPY (show_route_map,
- show_route_map_cmd,
- "show route-map [WORD]$route_map [json]$json",
- SHOW_STR
- "route-map information\n"
- "route-map name\n"
- JSON_STR)
+DEFPY(show_route_map, show_route_map_cmd,
+ "show route-map [WORD]$route_map [json]$json",
+ SHOW_STR
+ "route-map information\n"
+ "route-map name\n" JSON_STR)
{
show_route_map_send(route_map, !!json);
To apply the style suggestions:
curl https://gist.githubusercontent.com/polychaeta/503ef3a43472e22fd65265cf9fcd9f21/raw/2d99df7fbc2e5c7025ef0b1010f5aec709a7b91d/style.diff | git apply -
If you are a new contributor to FRR, please see our contributing guidelines.
After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.
Loading