]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add dlist_head function
authorAlan T. DeKok <aland@freeradius.org>
Mon, 4 Apr 2022 19:00:33 +0000 (15:00 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 4 Apr 2022 19:00:33 +0000 (15:00 -0400)
src/lib/util/tlist.h

index 36f00169cd656d8787433de80f23eee91e12ed79..10db34e43a910e9ed6c63a6b994b9fc9b6c04c1d 100644 (file)
@@ -937,6 +937,9 @@ DIAG_OFF(unused-function) \
        _Static_assert(IS_FIELD_COMPATIBLE(_element_type, _element_entry, FR_TLIST_ENTRY(_name)) == 1, "Bad tlist entry field type");\
        static inline   fr_tlist_head_t *_name ## _list_head(FR_TLIST_HEAD(_name) const *list) \
                { return        UNCONST(fr_tlist_head_t *, &list->head); } \
+\
+       static inline   fr_dlist_head_t *_name ## _dlist_head(FR_TLIST_HEAD(_name) const *list) \
+               { return        UNCONST(fr_dlist_head_t *, &list->head.dlist_head); } \
 \
        static inline   void _name ## _entry_init(_element_type *entry) \
                { \