Lists: fix a stupid sanitizer bug
This commit is contained in:
parent
3bb10b4d31
commit
e26a5195dd
1 changed files with 6 additions and 2 deletions
|
@ -167,8 +167,12 @@ LIST_INLINE void
|
||||||
replace_node(node *old, node *new)
|
replace_node(node *old, node *new)
|
||||||
{
|
{
|
||||||
EXPENSIVE_CHECK(check_list(NULL, old));
|
EXPENSIVE_CHECK(check_list(NULL, old));
|
||||||
|
|
||||||
|
if (old != new)
|
||||||
|
{
|
||||||
ASSUME(new->prev == NULL);
|
ASSUME(new->prev == NULL);
|
||||||
ASSUME(new->next == NULL);
|
ASSUME(new->next == NULL);
|
||||||
|
}
|
||||||
|
|
||||||
old->next->prev = new;
|
old->next->prev = new;
|
||||||
old->prev->next = new;
|
old->prev->next = new;
|
||||||
|
|
Loading…
Reference in a new issue