diff --git a/lib/isc/include/isc/list.h b/lib/isc/include/isc/list.h index b7a783c3ad..007cec0f30 100644 --- a/lib/isc/include/isc/list.h +++ b/lib/isc/include/isc/list.h @@ -15,6 +15,16 @@ #include +#define ISC_LIST_INITIALIZER \ + { \ + .head = NULL, .tail = NULL, \ + } +#define ISC_LINK_INITIALIZER_TYPE(type) \ + { \ + .prev = (type *)-1, .next = (type *)-1, \ + } +#define ISC_LINK_INITIALIZER ISC_LINK_INITIALIZER_TYPE(void) + #ifdef ISC_LIST_CHECKINIT #define ISC_LINK_INSIST(x) ISC_INSIST(x) #else /* ifdef ISC_LIST_CHECKINIT */