summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/rde_rib.c')
-rw-r--r--usr.sbin/bgpd/rde_rib.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 04f7e63d03b..3caaa3e9e65 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.261 2023/10/16 10:25:46 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.262 2024/05/29 10:34:56 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -1644,7 +1644,10 @@ TAILQ_HEAD(nexthop_queue, nexthop) nexthop_runners =
RB_HEAD(nexthop_tree, nexthop) nexthoptable =
RB_INITIALIZER(&nexthoptree);
-RB_GENERATE_STATIC(nexthop_tree, nexthop, entry, nexthop_compare);
+
+static inline int nexthop_cmp(struct nexthop *, struct nexthop *);
+
+RB_GENERATE_STATIC(nexthop_tree, nexthop, entry, nexthop_cmp);
void
nexthop_shutdown(void)
@@ -1834,7 +1837,7 @@ nexthop_get(struct bgpd_addr *nexthop)
if (nh == NULL) {
nh = calloc(1, sizeof(*nh));
if (nh == NULL)
- fatal("nexthop_alloc");
+ fatal("nexthop_get");
rdemem.nexthop_cnt++;
LIST_INIT(&nh->prefix_h);
@@ -1882,8 +1885,8 @@ nexthop_unref(struct nexthop *nh)
return (1);
}
-int
-nexthop_compare(struct nexthop *na, struct nexthop *nb)
+static inline int
+nexthop_cmp(struct nexthop *na, struct nexthop *nb)
{
struct bgpd_addr *a, *b;