diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2002-11-26 01:03:35 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2002-11-26 01:03:35 +0000 |
commit | 6e34af6845f853564bb8caf7777e4661efd210f2 (patch) | |
tree | c5504d10e8fe59138eecacf64165c556eda9ca9c /sys/altq/altq_classq.h | |
parent | 05fac4d8fd89533ada575fcedaac2375eb557fab (diff) |
KNF
Diffstat (limited to 'sys/altq/altq_classq.h')
-rw-r--r-- | sys/altq/altq_classq.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/altq/altq_classq.h b/sys/altq/altq_classq.h index 2de696af502..5be1a15245b 100644 --- a/sys/altq/altq_classq.h +++ b/sys/altq/altq_classq.h @@ -1,4 +1,4 @@ -/* $OpenBSD: altq_classq.h,v 1.1 2001/06/27 05:28:35 kjc Exp $ */ +/* $OpenBSD: altq_classq.h,v 1.2 2002/11/26 01:03:34 henning Exp $ */ /* $KAME: altq_classq.h,v 1.4 2001/02/09 07:20:40 kjc Exp $ */ /* @@ -89,11 +89,11 @@ extern void _flushq(class_queue_t *); /* * inlined versions */ -static __inline void +static __inline void _addq(class_queue_t *q, struct mbuf *m) { struct mbuf *m0; - + if ((m0 = qtail(q)) != NULL) m->m_nextpkt = m0->m_nextpkt; else @@ -107,7 +107,7 @@ static __inline struct mbuf * _getq(class_queue_t *q) { struct mbuf *m, *m0; - + if ((m = qtail(q)) == NULL) return (NULL); if ((m0 = m->m_nextpkt) != m) @@ -116,7 +116,7 @@ _getq(class_queue_t *q) qtail(q) = NULL; qlen(q)--; m0->m_nextpkt = NULL; - return (m0); + return (m0); } /* drop a packet at the tail of the queue */ @@ -132,7 +132,7 @@ _getq_tail(class_queue_t *q) m0 = m0->m_nextpkt; } while (m0 != m); prev->m_nextpkt = m->m_nextpkt; - if (prev == m) + if (prev == m) qtail(q) = NULL; else qtail(q) = prev; @@ -154,7 +154,7 @@ _getq_random(class_queue_t *q) qtail(q) = NULL; else { struct mbuf *prev = NULL; - + n = random() % qlen(q) + 1; for (i = 0; i < n; i++) { prev = m; @@ -173,14 +173,14 @@ static __inline void _removeq(class_queue_t *q, struct mbuf *m) { struct mbuf *m0, *prev; - + m0 = qtail(q); do { prev = m0; m0 = m0->m_nextpkt; } while (m0 != m); prev->m_nextpkt = m->m_nextpkt; - if (prev == m) + if (prev == m) qtail(q) = NULL; else if (qtail(q) == m) qtail(q) = prev; |