From 082844e58ba5840f3fb81b8bb0f175829b361596 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 9 Sep 2002 22:12:33 +0000 Subject: [PATCH] Set various defunct list magic numbers for trouble-shooting. --- src/common/list.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/common/list.c b/src/common/list.c index a0dbf0ffc28..8330081d6e7 100644 --- a/src/common/list.c +++ b/src/common/list.c @@ -41,9 +41,10 @@ ** Constants ** \***************/ -#define LIST_ALLOC 10 -#define LIST_MAGIC 0xDEADBEEF - +#define LIST_ALLOC 10 +#define LIST_MAGIC 0xDEADBEEF +#define LIST_DESTROYED 0xDEEDDEED +#define ITER_DESTROYED 0x1EED1EED /****************\ ** Data Types ** @@ -182,7 +183,7 @@ void list_destroy(List l) while (i) { assert(i->magic == LIST_MAGIC); iTmp = i->iNext; - assert(i->magic = 1); /* clear magic via assert abuse */ + assert(i->magic = LIST_DESTROYED); /* clear magic via assert abuse */ list_iterator_free(i); i = iTmp; } @@ -194,7 +195,7 @@ void list_destroy(List l) list_node_free(p); p = pTmp; } - assert(l->magic = 1); /* clear magic via assert abuse */ + assert(l->magic = LIST_DESTROYED); /* clear magic via assert abuse */ list_mutex_unlock(&l->mutex); list_mutex_destroy(&l->mutex); list_free(l); @@ -465,7 +466,7 @@ void list_iterator_destroy(ListIterator i) } } list_mutex_unlock(&i->list->mutex); - assert(i->magic = 1); /* clear magic via assert abuse */ + assert(i->magic = ITER_DESTROYED); /* clear magic via assert abuse */ list_iterator_free(i); return; } -- GitLab