From 62f81511589288ad78d3eaa3a7c12e4d540e3deb Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Tue, 12 Dec 2006 10:19:45 +0000 Subject: Kill peer_remove(). This function is only used once so inline it there. OK henning@ --- usr.sbin/bgpd/rde.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'usr.sbin/bgpd') diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c index 554b870a8a6..ec5e0b5755f 100644 --- a/usr.sbin/bgpd/rde.c +++ b/usr.sbin/bgpd/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.214 2006/12/08 22:31:16 itojun Exp $ */ +/* $OpenBSD: rde.c,v 1.215 2006/12/12 10:19:44 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -78,7 +78,6 @@ void peer_init(u_int32_t); void peer_shutdown(void); void peer_localaddrs(struct rde_peer *, struct bgpd_addr *); struct rde_peer *peer_add(u_int32_t, struct peer_config *); -void peer_remove(struct rde_peer *); struct rde_peer *peer_get(u_int32_t); void peer_up(u_int32_t, struct session_up *); void peer_down(u_int32_t); @@ -2186,14 +2185,6 @@ peer_add(u_int32_t id, struct peer_config *p_conf) return (peer); } -void -peer_remove(struct rde_peer *peer) -{ - LIST_REMOVE(peer, hash_l); - LIST_REMOVE(peer, peer_l); - free(peer); -} - void peer_localaddrs(struct rde_peer *peer, struct bgpd_addr *laddr) { @@ -2315,7 +2306,9 @@ peer_down(u_int32_t id) /* Deletions are performed in path_remove() */ rde_send_pftable_commit(); - peer_remove(peer); + LIST_REMOVE(peer, hash_l); + LIST_REMOVE(peer, peer_l); + free(peer); } void -- cgit v1.2.3