summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2007-06-03 18:13:59 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2007-06-03 18:13:59 +0000
commita38329b5314325c72ec9e5f7fa719e032be4caa9 (patch)
tree47614449eee3ecd0c9fcca8833656e3571102646
parentdde4a85d9ddb5d516c37a565156ef509738c3c22 (diff)
Notes
-rw-r--r--lib/libc/include/isc/list.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/include/isc/list.h b/lib/libc/include/isc/list.h
index 8a6973aa7933..fef631b4c9ca 100644
--- a/lib/libc/include/isc/list.h
+++ b/lib/libc/include/isc/list.h
@@ -73,12 +73,16 @@
INSIST(LINKED(elt, link));\
if ((elt)->link.next != NULL) \
(elt)->link.next->link.prev = (elt)->link.prev; \
- else \
+ else { \
+ INSIST((list).tail == (elt)); \
(list).tail = (elt)->link.prev; \
+ } \
if ((elt)->link.prev != NULL) \
(elt)->link.prev->link.next = (elt)->link.next; \
- else \
+ else { \
+ INSIST((list).head == (elt)); \
(list).head = (elt)->link.next; \
+ } \
INIT_LINK_TYPE(elt, link, type); \
} while (0)
#define UNLINK(list, elt, link) \
@@ -117,3 +121,4 @@
#define DEQUEUE(list, elt, link) UNLINK(list, elt, link)
#endif /* LIST_H */
+/*! \file */