diff options
author | Hajimu UMEMOTO <ume@FreeBSD.org> | 2007-06-03 18:11:28 +0000 |
---|---|---|
committer | Hajimu UMEMOTO <ume@FreeBSD.org> | 2007-06-03 18:11:28 +0000 |
commit | f3fd1dbd2ee0f02610d951d469eb1930ec6b5efa (patch) | |
tree | 4cc38f888bed68a5831b2b38fdb192def4dfc720 | |
parent | 861249f5830e8658b61130e0ee7eaad2e93d0449 (diff) |
Notes
-rw-r--r-- | lib/libc/include/isc/list.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/include/isc/list.h b/lib/libc/include/isc/list.h index ad574ac2b587..c85c6676b51c 100644 --- a/lib/libc/include/isc/list.h +++ b/lib/libc/include/isc/list.h @@ -66,12 +66,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) \ @@ -110,3 +114,4 @@ #define DEQUEUE(list, elt, link) UNLINK(list, elt, link) #endif /* LIST_H */ +/*! \file */ |