mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
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))
This commit is contained in:
parent
7cbe26069c
commit
bfe4641596
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132152
@ -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; \
|
||||
|
Loading…
Reference in New Issue
Block a user