diff --git a/lib/event.c b/lib/event.c index 5031f314..766ffa15 100644 --- a/lib/event.c +++ b/lib/event.c @@ -182,6 +182,7 @@ ev_run_list(event_list *l) WALK_LIST_FIRST(n, tmp_list) { event *e = SKIP_BACK(event, n, n); + ASSERT_DIE(n->next->prev == n); if (legacy) { diff --git a/lib/lists.c b/lib/lists.c index dc2e4cbb..2f92defe 100644 --- a/lib/lists.c +++ b/lib/lists.c @@ -208,6 +208,9 @@ add_tail_list(list *to, list *l) EXPENSIVE_CHECK(check_list(to, NULL)); EXPENSIVE_CHECK(check_list(l, NULL)); + ASSERT_DIE(l->head->prev == &l->head_node); + ASSERT_DIE(l->tail->next == &l->tail_node); + node *p = to->tail; node *q = l->head;