queue: mod to TAILQ_MOVE to ensure empty Q is properly copied/init
This mirrors a change that Andreas had already made in the showtime copy.
This commit is contained in:
parent
6482d33ba9
commit
143c33f15b
1 changed files with 6 additions and 3 deletions
|
@ -132,9 +132,12 @@
|
|||
#define TAILQ_MOVE(newhead, oldhead, field) do { \
|
||||
if(TAILQ_FIRST(oldhead)) { \
|
||||
TAILQ_FIRST(oldhead)->field.tqe_prev = &(newhead)->tqh_first; \
|
||||
} \
|
||||
(newhead)->tqh_first = (oldhead)->tqh_first; \
|
||||
(newhead)->tqh_last = (oldhead)->tqh_last; \
|
||||
(newhead)->tqh_first = (oldhead)->tqh_first; \
|
||||
(newhead)->tqh_last = (oldhead)->tqh_last; \
|
||||
TAILQ_INIT(oldhead);\
|
||||
} else { \
|
||||
TAILQ_INIT(newhead);\
|
||||
}\
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue