diff options
author | dougb <dougb@FreeBSD.org> | 2002-07-01 01:07:56 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2002-07-01 01:07:56 +0000 |
commit | 67c9dec97554c34ae92f7d669f1c0de844fcf4c8 (patch) | |
tree | 3212d35c5abe2389cdb3a7d42620ae08e2b6167d /contrib/bind/include/isc/list.h | |
parent | ea2af26043626cce55951657dd0c8d5ba39ab935 (diff) | |
parent | f4bd5053ab2eb505b16099244427d9e93442fe90 (diff) | |
download | FreeBSD-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.h | 14 |
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) |