From 62b346eefa1b9e09c9372f5b6376e1bca4162015 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Sat, 8 Sep 2018 21:46:23 +0200 Subject: *: clean up cmd_node initializers ... and use named assignments everywhere (so I can change the struct.) Signed-off-by: David Lamparter --- vrrpd/vrrp_vty.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'vrrpd/vrrp_vty.c') diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c index 892c8dadd..98e0e598e 100644 --- a/vrrpd/vrrp_vty.c +++ b/vrrpd/vrrp_vty.c @@ -744,9 +744,23 @@ static int vrrp_config_write_interface(struct vty *vty) return write; } -static struct cmd_node interface_node = {INTERFACE_NODE, "%s(config-if)# ", 1}; -static struct cmd_node debug_node = {DEBUG_NODE, "", 1}; -static struct cmd_node vrrp_node = {VRRP_NODE, "", 1}; +static struct cmd_node interface_node = { + .node = INTERFACE_NODE, + .prompt = "%s(config-if)# ", + .vtysh = 1, +}; + +static struct cmd_node debug_node = { + .node = DEBUG_NODE, + .prompt = "", + .vtysh = 1, +}; + +static struct cmd_node vrrp_node = { + .node = VRRP_NODE, + .prompt = "", + .vtysh = 1, +}; void vrrp_vty_init(void) { -- cgit v1.2.3