From: Renato Westphal Date: Fri, 16 Jun 2017 20:30:35 +0000 (-0300) Subject: ldpd: fix fallouts from the rb-tree conversion X-Git-Tag: reindent-master-before~62^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=522faa1f8be658c18284e3e9e5dcaefdf92c4c57;p=mirror%2Ffrr.git ldpd: fix fallouts from the rb-tree conversion Signed-off-by: Renato Westphal --- diff --git a/ldpd/adjacency.c b/ldpd/adjacency.c index 8a2252e722..e73d1b51a2 100644 --- a/ldpd/adjacency.c +++ b/ldpd/adjacency.c @@ -163,7 +163,7 @@ adj_find(struct in_addr lsr_id, struct hello_source *source) } int -adj_get_af(struct adj *adj) +adj_get_af(const struct adj *adj) { switch (adj->source.type) { case HELLO_LINK: diff --git a/ldpd/interface.c b/ldpd/interface.c index 527a6bc963..ac48520f7b 100644 --- a/ldpd/interface.c +++ b/ldpd/interface.c @@ -81,12 +81,12 @@ ldpe_if_init(struct iface *iface) /* ipv4 */ iface->ipv4.iface = iface; iface->ipv4.state = IF_STA_DOWN; - RB_INIT(iface_head, &iface->ipv4.adj_tree); + RB_INIT(ia_adj_head, &iface->ipv4.adj_tree); /* ipv6 */ iface->ipv6.iface = iface; iface->ipv6.state = IF_STA_DOWN; - RB_INIT(iface_head, &iface->ipv6.adj_tree); + RB_INIT(ia_adj_head, &iface->ipv6.adj_tree); } void @@ -305,7 +305,7 @@ if_reset(struct iface *iface, int af) ia = iface_af_get(iface, af); if_stop_hello_timer(ia); - while ((adj = RB_ROOT(iface_head, &ia->adj_tree)) != NULL) + while ((adj = RB_ROOT(ia_adj_head, &ia->adj_tree)) != NULL) adj_del(adj, S_SHUTDOWN); /* try to cleanup */ diff --git a/ldpd/ldpe.h b/ldpd/ldpe.h index d34ca4dc24..74f6b852b0 100644 --- a/ldpd/ldpe.h +++ b/ldpd/ldpe.h @@ -237,7 +237,7 @@ struct adj *adj_new(struct in_addr, struct hello_source *, union ldpd_addr *); void adj_del(struct adj *, uint32_t); struct adj *adj_find(struct in_addr, struct hello_source *); -int adj_get_af(struct adj *adj); +int adj_get_af(const struct adj *adj); void adj_start_itimer(struct adj *); void adj_stop_itimer(struct adj *); struct tnbr *tnbr_new(int, union ldpd_addr *);