mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: mt_lists: Do nothing in MT_LIST_ADD/MT_LIST_ADDQ if already in list.
Modify MT_LIST_ADD and MT_LIST_ADDQ to do nothing if the element is already in a list.
This commit is contained in:
parent
9570ecf662
commit
cb22ad4f71
@ -221,6 +221,11 @@ struct cond_wordlist {
|
|||||||
__ha_barrier_store(); \
|
__ha_barrier_store(); \
|
||||||
continue; \
|
continue; \
|
||||||
} \
|
} \
|
||||||
|
if ((el)->next != (el) || (el)->prev != (el)) { \
|
||||||
|
(n)->prev = p; \
|
||||||
|
(lh)->next = n; \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
(el)->next = n; \
|
(el)->next = n; \
|
||||||
(el)->prev = p; \
|
(el)->prev = p; \
|
||||||
__ha_barrier_store(); \
|
__ha_barrier_store(); \
|
||||||
@ -246,6 +251,11 @@ struct cond_wordlist {
|
|||||||
__ha_barrier_store(); \
|
__ha_barrier_store(); \
|
||||||
continue; \
|
continue; \
|
||||||
} \
|
} \
|
||||||
|
if ((el)->next != (el) || (el)->prev != (el)) { \
|
||||||
|
p->next = n; \
|
||||||
|
(lh)->prev = p; \
|
||||||
|
break; \
|
||||||
|
} \
|
||||||
(el)->next = n; \
|
(el)->next = n; \
|
||||||
(el)->prev = p; \
|
(el)->prev = p; \
|
||||||
__ha_barrier_store(); \
|
__ha_barrier_store(); \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user