From: Todd C. Miller Date: Thu, 6 Mar 2008 17:31:57 +0000 (+0000) Subject: add DEBUG to list2tq X-Git-Tag: SUDO_1_7_0~157 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fbd32170a92d8134e16417a9345fe0e837ee659;p=sudo add DEBUG to list2tq --- 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 */