mirror of
https://github.com/schoebel/mars
synced 2024-12-18 04:34:48 +00:00
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
Block a user