summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-05-29 10:34:57 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-05-29 10:34:57 +0000
commita1ea979dcb8ba7cfb53325d83c4371a460d7d7b7 (patch)
tree0dd7bef6bd42b91de4bc11ffdc0212011854bd18 /usr.sbin/bgpd
parent79c39ae0dcdce37ab750b257ad07786ef20f146e (diff)
Rename nexthop_compare to nexthop_cmp and make it static inline.
OK henning@ sthen@
Diffstat (limited to 'usr.sbin/bgpd')
-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;