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 --- lib/filter.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'lib/filter.c') diff --git a/lib/filter.c b/lib/filter.c index 3226fb2f5e..381f9829bb 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -2813,8 +2813,10 @@ static int config_write_access(struct vty *vty, afi_t afi) } static struct cmd_node access_mac_node = { - ACCESS_MAC_NODE, "", /* Access list has no interface. */ - 1}; + .node = ACCESS_MAC_NODE, + .prompt = "", + .vtysh = 1, +}; static int config_write_access_mac(struct vty *vty) { @@ -2863,9 +2865,11 @@ static void access_list_init_mac(void) } /* Access-list node. */ -static struct cmd_node access_node = {ACCESS_NODE, - "", /* Access list has no interface. */ - 1}; +static struct cmd_node access_node = { + .node = ACCESS_NODE, + .prompt = "", + .vtysh = 1, +}; static int config_write_access_ipv4(struct vty *vty) { @@ -2948,7 +2952,11 @@ static void access_list_init_ipv4(void) install_element(CONFIG_NODE, &no_access_list_remark_comment_cmd); } -static struct cmd_node access_ipv6_node = {ACCESS_IPV6_NODE, "", 1}; +static struct cmd_node access_ipv6_node = { + .node = ACCESS_IPV6_NODE, + .prompt = "", + .vtysh = 1, +}; static int config_write_access_ipv6(struct vty *vty) { -- cgit v1.2.3