diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:26 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-05-20 03:04:26 +0200 |
commit | 4e3afb147210d0e98de5ad158062d1b79ac026fb (patch) | |
tree | 4e04b743fffb14c55801fb2d0a2d8c8a50afacd8 /zebra/router-id.c | |
parent | lib: lib-warnings.patch (diff) | |
download | frr-4e3afb147210d0e98de5ad158062d1b79ac026fb.tar.xz frr-4e3afb147210d0e98de5ad158062d1b79ac026fb.zip |
zebra: zebra-warnings.patch
Remove compiled warnings for the zebra directory
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
Diffstat (limited to 'zebra/router-id.c')
-rw-r--r-- | zebra/router-id.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/zebra/router-id.c b/zebra/router-id.c index b738027ec..ae52b5ea6 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -41,8 +41,10 @@ #include "zebra/router-id.h" #include "zebra/redistribute.h" -static struct list rid_all_sorted_list; -static struct list rid_lo_sorted_list; +static struct list _rid_all_sorted_list; +static struct list _rid_lo_sorted_list; +static struct list *rid_all_sorted_list = &_rid_all_sorted_list; +static struct list *rid_lo_sorted_list = &_rid_lo_sorted_list; static struct prefix rid_user_assigned; /* master zebra server structure */ @@ -86,15 +88,15 @@ router_id_get (struct prefix *p) if (rid_user_assigned.u.prefix4.s_addr) p->u.prefix4.s_addr = rid_user_assigned.u.prefix4.s_addr; - else if (!list_isempty (&rid_lo_sorted_list)) + else if (!list_isempty (rid_lo_sorted_list)) { - node = listtail (&rid_lo_sorted_list); + node = listtail (rid_lo_sorted_list); c = listgetdata (node); p->u.prefix4.s_addr = c->address->u.prefix4.s_addr; } - else if (!list_isempty (&rid_all_sorted_list)) + else if (!list_isempty (rid_all_sorted_list)) { - node = listtail (&rid_all_sorted_list); + node = listtail (rid_all_sorted_list); c = listgetdata (node); p->u.prefix4.s_addr = c->address->u.prefix4.s_addr; } @@ -131,9 +133,9 @@ router_id_add_address (struct connected *ifc) if (!strncmp (ifc->ifp->name, "lo", 2) || !strncmp (ifc->ifp->name, "dummy", 5)) - l = &rid_lo_sorted_list; + l = rid_lo_sorted_list; else - l = &rid_all_sorted_list; + l = rid_all_sorted_list; if (!router_id_find_node (l, ifc)) listnode_add_sort (l, ifc); @@ -164,9 +166,9 @@ router_id_del_address (struct connected *ifc) if (!strncmp (ifc->ifp->name, "lo", 2) || !strncmp (ifc->ifp->name, "dummy", 5)) - l = &rid_lo_sorted_list; + l = rid_lo_sorted_list; else - l = &rid_all_sorted_list; + l = rid_all_sorted_list; if ((c = router_id_find_node (l, ifc))) listnode_delete (l, c); @@ -240,12 +242,12 @@ router_id_init (void) install_element (CONFIG_NODE, &router_id_cmd); install_element (CONFIG_NODE, &no_router_id_cmd); - memset (&rid_all_sorted_list, 0, sizeof (rid_all_sorted_list)); - memset (&rid_lo_sorted_list, 0, sizeof (rid_lo_sorted_list)); + memset (rid_all_sorted_list, 0, sizeof (rid_all_sorted_list)); + memset (rid_lo_sorted_list, 0, sizeof (rid_lo_sorted_list)); memset (&rid_user_assigned, 0, sizeof (rid_user_assigned)); - rid_all_sorted_list.cmp = router_id_cmp; - rid_lo_sorted_list.cmp = router_id_cmp; + rid_all_sorted_list->cmp = router_id_cmp; + rid_lo_sorted_list->cmp = router_id_cmp; rid_user_assigned.family = AF_INET; rid_user_assigned.prefixlen = 32; |