summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 21:46:23 +0200
committerDavid Lamparter <equinox@diac24.net>2020-04-16 12:53:00 +0200
commit62b346eefa1b9e09c9372f5b6376e1bca4162015 (patch)
tree2e3bc16d1d0765ab033c7ffd24ca58b3b5d35168 /zebra/zebra_vty.c
parent4c749d99dcdc7f0d811d0bbd2858b87f41e4feba (diff)
*: clean up cmd_node initializers
... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index ef3dc9808f..d663e4c5a9 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -3478,15 +3478,27 @@ DEFUN_HIDDEN (show_frr,
}
/* IP node for static routes. */
-static struct cmd_node ip_node = {IP_NODE, "", 1};
-static struct cmd_node protocol_node = {PROTOCOL_NODE, "", 1};
+static struct cmd_node ip_node = {
+ .node = IP_NODE,
+ .prompt = "",
+ .vtysh = 1,
+};
+static struct cmd_node protocol_node = {
+ .node = PROTOCOL_NODE,
+ .prompt = "",
+ .vtysh = 1,
+};
/* table node for routing tables. */
-static struct cmd_node table_node = {TABLE_NODE,
- "", /* This node has no interface. */
- 1};
-static struct cmd_node forwarding_node = {FORWARDING_NODE,
- "", /* This node has no interface. */
- 1};
+static struct cmd_node table_node = {
+ .node = TABLE_NODE,
+ .prompt = "",
+ .vtysh = 1,
+};
+static struct cmd_node forwarding_node = {
+ .node = FORWARDING_NODE,
+ .prompt = "",
+ .vtysh = 1,
+};
/* Route VTY. */
void zebra_vty_init(void)