From 3fbd32170a92d8134e16417a9345fe0e837ee659 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 6 Mar 2008 17:31:57 +0000 Subject: [PATCH] add DEBUG to list2tq --- list.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/list.c b/list.c index 695523b91..1a17a1d13 100644 --- a/list.c +++ b/list.c @@ -82,6 +82,12 @@ list2tq(vh, vl) struct list_proto *l = (struct list_proto *)vl; if (l != NULL) { +#ifdef DEBUG + if (l->prev == NULL) { + warningx("list2tq called with non-semicircular list"); + abort(); + } +#endif h->first = l; h->last = l->prev; /* l->prev points to the last member of l */ l->prev = NULL; /* zero last ptr now that we have a head */ -- 2.40.0