mirror of https://github.com/schoebel/mars
infra: tighten list checking
This commit is contained in:
parent
732dbc7a75
commit
f102c3094f
|
@ -50,7 +50,11 @@ do { \
|
|||
|
||||
#define CHECK_HEAD_EMPTY(head) \
|
||||
do { \
|
||||
if (BRICK_CHECKING && unlikely(!list_empty(head) && (head)->next)) { \
|
||||
if (BRICK_CHECKING && \
|
||||
unlikely(!list_empty(head) && \
|
||||
(head)->next && \
|
||||
(head)->next != LIST_POISON1 && \
|
||||
(head)->prev != LIST_POISON2)) { \
|
||||
list_del_init(head); \
|
||||
BRICK_ERR("%d: list_head " #head " (%p) not empty\n", __LINE__, head); \
|
||||
} \
|
||||
|
|
Loading…
Reference in New Issue