summaryrefslogtreecommitdiffstats
path: root/contrib/bind/include/isc/list.h
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2002-07-01 01:07:56 +0000
committerdougb <dougb@FreeBSD.org>2002-07-01 01:07:56 +0000
commit67c9dec97554c34ae92f7d669f1c0de844fcf4c8 (patch)
tree3212d35c5abe2389cdb3a7d42620ae08e2b6167d /contrib/bind/include/isc/list.h
parentea2af26043626cce55951657dd0c8d5ba39ab935 (diff)
parentf4bd5053ab2eb505b16099244427d9e93442fe90 (diff)
downloadFreeBSD-src-67c9dec97554c34ae92f7d669f1c0de844fcf4c8.zip
FreeBSD-src-67c9dec97554c34ae92f7d669f1c0de844fcf4c8.tar.gz
This commit was generated by cvs2svn to compensate for changes in r99179,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/bind/include/isc/list.h')
-rw-r--r--contrib/bind/include/isc/list.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/bind/include/isc/list.h b/contrib/bind/include/isc/list.h
index 21dd565..0aa6f7d 100644
--- a/contrib/bind/include/isc/list.h
+++ b/contrib/bind/include/isc/list.h
@@ -24,11 +24,13 @@
do { (list).head = NULL; (list).tail = NULL; } while (0)
#define LINK(type) struct { type *prev, *next; }
-#define INIT_LINK(elt, link) \
+#define INIT_LINK_TYPE(elt, link, type) \
do { \
- (elt)->link.prev = (void *)(-1); \
- (elt)->link.next = (void *)(-1); \
+ (elt)->link.prev = (type *)(-1); \
+ (elt)->link.next = (type *)(-1); \
} while (0)
+#define INIT_LINK(elt, link) \
+ INIT_LINK_TYPE(elt, link, void)
#define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1))
#define HEAD(list) ((list).head)
@@ -59,7 +61,7 @@
(list).tail = (elt); \
} while (0)
-#define UNLINK(list, elt, link) \
+#define UNLINK_TYPE(list, elt, link, type) \
do { \
INSIST(LINKED(elt, link));\
if ((elt)->link.next != NULL) \
@@ -70,8 +72,10 @@
(elt)->link.prev->link.next = (elt)->link.next; \
else \
(list).head = (elt)->link.next; \
- INIT_LINK(elt, link); \
+ INIT_LINK_TYPE(elt, link, type); \
} while (0)
+#define UNLINK(list, elt, link) \
+ UNLINK_TYPE(list, elt, link, void)
#define PREV(elt, link) ((elt)->link.prev)
#define NEXT(elt, link) ((elt)->link.next)
OpenPOWER on IntegriCloud