diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-21 10:44:43 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-03-21 10:44:43 +0000 |
commit | 9d1358ae60dd2cbe7604ea386be3b2f245f27d3d (patch) | |
tree | d7a32452bcf83ec14e8fe1311ce580c96d29a606 /sys/net/route.c | |
parent | 6e8718dbafcdd1a88640590b651dfa2a0f28ec3c (diff) |
rt_timer* spring cleanup.
Rename and document rt_timer_count() into rt_timer_queue_count() to
be consistent with the other functions. Remove unused argument from
rt_timer_queue_destroy(), clean the definitions and finally use the
same order in NAME and DESCRIPTION as requested by jmc@.
ok henning@
Diffstat (limited to 'sys/net/route.c')
-rw-r--r-- | sys/net/route.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/route.c b/sys/net/route.c index bd42314ed71..c650cedc6d9 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -1,4 +1,4 @@ -/* $OpenBSD: route.c,v 1.155 2014/03/18 10:47:34 mpi Exp $ */ +/* $OpenBSD: route.c,v 1.156 2014/03/21 10:44:42 mpi Exp $ */ /* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */ /* @@ -144,6 +144,7 @@ int rttrash; /* routes not in table but not freed */ struct pool rtentry_pool; /* pool for rtentry structures */ struct pool rttimer_pool; /* pool for rttimer structures */ +void rt_timer_init(void); int rtable_init(struct radix_node_head ***, u_int); int rtflushclone1(struct radix_node *, void *, u_int); void rtflushclone(struct radix_node_head *, struct rtentry *); @@ -1232,15 +1233,14 @@ rt_timer_queue_change(struct rttimer_queue *rtq, long timeout) } void -rt_timer_queue_destroy(struct rttimer_queue *rtq, int destroy) +rt_timer_queue_destroy(struct rttimer_queue *rtq) { struct rttimer *r; while ((r = TAILQ_FIRST(&rtq->rtq_head)) != NULL) { LIST_REMOVE(r, rtt_link); TAILQ_REMOVE(&rtq->rtq_head, r, rtt_next); - if (destroy) - RTTIMER_CALLOUT(r); + RTTIMER_CALLOUT(r); pool_put(&rttimer_pool, r); if (rtq->rtq_count > 0) rtq->rtq_count--; @@ -1253,7 +1253,7 @@ rt_timer_queue_destroy(struct rttimer_queue *rtq, int destroy) } unsigned long -rt_timer_count(struct rttimer_queue *rtq) +rt_timer_queue_count(struct rttimer_queue *rtq) { return (rtq->rtq_count); } |