summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_advertise.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_advertise.c')
-rw-r--r--bgpd/bgp_advertise.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c
index 73b868a8..b9f4a85b 100644
--- a/bgpd/bgp_advertise.c
+++ b/bgpd/bgp_advertise.c
@@ -72,10 +72,10 @@ baa_hash_key (void *p)
}
static int
-baa_hash_cmp (void *p1, void *p2)
+baa_hash_cmp (const void *p1, const void *p2)
{
- struct bgp_advertise_attr * baa1 = (struct bgp_advertise_attr *) p1;
- struct bgp_advertise_attr * baa2 = (struct bgp_advertise_attr *) p2;
+ const struct bgp_advertise_attr * baa1 = p1;
+ const struct bgp_advertise_attr * baa2 = p2;
return attrhash_cmp (baa1->attr, baa2->attr);
}
@@ -220,9 +220,8 @@ bgp_adj_out_set (struct bgp_node *rn, struct peer *peer, struct prefix *p,
struct bgp_adj_out *adj = NULL;
struct bgp_advertise *adv;
-#ifdef DISABLE_BGP_ANNOUNCE
- return;
-#endif /* DISABLE_BGP_ANNOUNCE */
+ if (DISABLE_BGP_ANNOUNCE)
+ return;
/* Look for adjacency information. */
if (rn)
@@ -274,9 +273,8 @@ bgp_adj_out_unset (struct bgp_node *rn, struct peer *peer, struct prefix *p,
struct bgp_adj_out *adj;
struct bgp_advertise *adv;
-#ifdef DISABLE_BGP_ANNOUNCE
- return;
-#endif /* DISABLE_BGP_ANNOUNCE */
+ if (DISABLE_BGP_ANNOUNCE)
+ return;
/* Lookup existing adjacency, if it is not there return immediately. */
for (adj = rn->adj_out; adj; adj = adj->next)