]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_vty.c
*: clean up cmd_node initializers
[mirror_frr.git] / ospfd / ospf_vty.c
index fd2ab07261bb3fd95c6059724fedf5c22c9e1794..c2b08cab772ea9a1d4fa1b8fd3b3effeb5ad0c20 100644 (file)
@@ -54,8 +54,8 @@
 #include "ospfd/ospf_bfd.h"
 
 FRR_CFG_DEFAULT_BOOL(OSPF_LOG_ADJACENCY_CHANGES,
-       { .val_long = true, .match_profile = "datacenter", },
-       { .val_long = false },
+       { .val_bool = true, .match_profile = "datacenter", },
+       { .val_bool = false },
 )
 
 static const char *const ospf_network_type_str[] = {
@@ -93,7 +93,7 @@ static int str2metric(const char *str, int *metric)
                return 0;
 
        *metric = strtol(str, NULL, 10);
-       if (*metric < 0 && *metric > 16777214) {
+       if (*metric < 0 || *metric > 16777214) {
                /* vty_out (vty, "OSPF metric value is invalid\n"); */
                return 0;
        }
@@ -10556,7 +10556,11 @@ void ospf_vty_show_init(void)
 
 
 /* ospfd's interface node. */
-static struct cmd_node interface_node = {INTERFACE_NODE, "%s(config-if)# ", 1};
+static struct cmd_node interface_node = {
+       .node = INTERFACE_NODE,
+       .prompt = "%s(config-if)# ",
+       .vtysh = 1,
+};
 
 /* Initialization of OSPF interface. */
 static void ospf_vty_if_init(void)
@@ -10668,7 +10672,11 @@ static void ospf_vty_zebra_init(void)
 #endif /* 0 */
 }
 
-static struct cmd_node ospf_node = {OSPF_NODE, "%s(config-router)# ", 1};
+static struct cmd_node ospf_node = {
+       .node = OSPF_NODE,
+       .prompt = "%s(config-router)# ",
+       .vtysh = 1,
+};
 
 static void ospf_interface_clear(struct interface *ifp)
 {