From e26a5195dd6c62e6f4b80d13b6ecd5f40ee68546 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sat, 17 Aug 2019 14:03:47 +0200 Subject: [PATCH] Lists: fix a stupid sanitizer bug --- lib/lists.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/lists.c b/lib/lists.c index c162a991..8553ee27 100644 --- a/lib/lists.c +++ b/lib/lists.c @@ -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;