summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-07-14 13:31:41 +0000
committermlaier <mlaier@FreeBSD.org>2004-07-14 13:31:41 +0000
commitd42002971fd9756c47034ab48dba6cd4b93e7651 (patch)
tree9efdb8185be4f188456a36d38bfc372af429fda6
parentd403dd49eedd8004eb0512ad354328afae418e0c (diff)
downloadFreeBSD-src-d42002971fd9756c47034ab48dba6cd4b93e7651.zip
FreeBSD-src-d42002971fd9756c47034ab48dba6cd4b93e7651.tar.gz
Fix a copy-and-paste-o in IFQ_DRV_PREPEND - all pointyhats to me.
While here also fix a (not less stupid) braino in IFQ_DRV_PURGE. Reported-by: clement Tested-by: clement (_PREPEND in sis(4))
-rw-r--r--sys/net/if_var.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 50ec732..a01ed03 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -512,8 +512,8 @@ do { \
#define IFQ_DRV_PREPEND(ifq, m) \
do { \
(m)->m_nextpkt = (ifq)->ifq_drv_head; \
- if ((ifq)->ifq_tail == NULL) \
- (ifq)->ifq_tail = (m); \
+ if ((ifq)->ifq_drv_tail == NULL) \
+ (ifq)->ifq_drv_tail = (m); \
(ifq)->ifq_drv_head = (m); \
(ifq)->ifq_drv_len++; \
} while (0)
@@ -523,9 +523,9 @@ do { \
#define IFQ_DRV_PURGE(ifq) \
do { \
- struct mbuf *m = (ifq)->ifq_drv_head; \
- while(m != NULL) { \
- m = m->m_nextpkt; \
+ struct mbuf *m, *n = (ifq)->ifq_drv_head; \
+ while((m = n) != NULL) { \
+ n = m->m_nextpkt; \
m_freem(m); \
} \
(ifq)->ifq_drv_head = (ifq)->ifq_drv_tail = NULL; \
OpenPOWER on IntegriCloud