summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_intra.c
diff options
context:
space:
mode:
authorVincent JARDIN <vincent.jardin@6wind.com>2017-10-08 18:20:12 +0200
committerVincent JARDIN <vincent.jardin@6wind.com>2017-10-08 23:06:57 +0200
commit3981b5c7f3232086aecd35e56bbeb4b5116c8469 (patch)
treead2a5bb75b4b5b831641a343cd34a99a534a4707 /ospf6d/ospf6_intra.c
parentrfapi: avoid calling NULL() function. (diff)
downloadfrr-3981b5c7f3232086aecd35e56bbeb4b5116c8469.tar.xz
frr-3981b5c7f3232086aecd35e56bbeb4b5116c8469.zip
ospf6d: fix clang warning, NULL() calls
Avoid show() methods from being a NULL function when it is called. Meanwhile, I did const'ify the handlers so only its debug field can be changed. Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
Diffstat (limited to 'ospf6d/ospf6_intra.c')
-rw-r--r--ospf6d/ospf6_intra.c46
1 files changed, 33 insertions, 13 deletions
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index e4644bb09..a2caeccb8 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -1630,21 +1630,41 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa)
oa->name);
}
-struct ospf6_lsa_handler router_handler = {OSPF6_LSTYPE_ROUTER, "Router", "Rtr",
- ospf6_router_lsa_show,
- ospf6_router_lsa_get_nbr_id};
-
-struct ospf6_lsa_handler network_handler = {OSPF6_LSTYPE_NETWORK, "Network",
- "Net", ospf6_network_lsa_show,
- ospf6_network_lsa_get_ar_id};
-
-struct ospf6_lsa_handler link_handler = {OSPF6_LSTYPE_LINK, "Link", "Lnk",
- ospf6_link_lsa_show,
- ospf6_link_lsa_get_prefix_str};
+struct ospf6_lsa_handler router_handler = {
+ .lh_type = OSPF6_LSTYPE_ROUTER,
+ .lh_name = "Router",
+ .lh_short_name = "Rtr",
+ .lh_show = ospf6_router_lsa_show,
+ .lh_get_prefix_str = ospf6_router_lsa_get_nbr_id,
+ .lh_debug = 0
+};
+
+struct ospf6_lsa_handler network_handler = {
+ .lh_type = OSPF6_LSTYPE_NETWORK,
+ .lh_name = "Network",
+ .lh_short_name = "Net",
+ .lh_show = ospf6_network_lsa_show,
+ .lh_get_prefix_str = ospf6_network_lsa_get_ar_id,
+ .lh_debug = 0
+};
+
+struct ospf6_lsa_handler link_handler = {
+ .lh_type = OSPF6_LSTYPE_LINK,
+ .lh_name = "Link",
+ .lh_short_name = "Lnk",
+ .lh_show = ospf6_link_lsa_show,
+ .lh_get_prefix_str = ospf6_link_lsa_get_prefix_str,
+ .lh_debug = 0
+};
struct ospf6_lsa_handler intra_prefix_handler = {
- OSPF6_LSTYPE_INTRA_PREFIX, "Intra-Prefix", "INP",
- ospf6_intra_prefix_lsa_show, ospf6_intra_prefix_lsa_get_prefix_str};
+ .lh_type = OSPF6_LSTYPE_INTRA_PREFIX,
+ .lh_name = "Intra-Prefix",
+ .lh_short_name = "INP",
+ .lh_show = ospf6_intra_prefix_lsa_show,
+ .lh_get_prefix_str = ospf6_intra_prefix_lsa_get_prefix_str,
+ .lh_debug = 0
+};
void ospf6_intra_init(void)
{