0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00

Lists: fix a stupid sanitizer bug

This commit is contained in:
Maria Matejka 2019-08-17 14:03:47 +02:00
parent 0227ccd159
commit 9de2e19611

View File

@ -167,8 +167,12 @@ LIST_INLINE void
replace_node(node *old, node *new)
{
EXPENSIVE_CHECK(check_list(NULL, old));
ASSUME(new->prev == NULL);
ASSUME(new->next == NULL);
if (old != new)
{
ASSUME(new->prev == NULL);
ASSUME(new->next == NULL);
}
old->next->prev = new;
old->prev->next = new;