From: Alan T. DeKok Date: Thu, 9 Dec 2021 19:00:49 +0000 (-0500) Subject: add more functions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4906f0c453d8a21a19caea9ba1334785949b887;p=thirdparty%2Ffreeradius-server.git add more functions --- diff --git a/src/lib/util/dlist.h b/src/lib/util/dlist.h index 1e7808ea5b..8a94c071e6 100644 --- a/src/lib/util/dlist.h +++ b/src/lib/util/dlist.h @@ -1052,8 +1052,14 @@ static inline void fr_dlist_sort(fr_dlist_head_t *list, fr_cmp_t cmp) */ #define FR_DLIST_NEW_TYPE(_name, _list_type, _member_head, _entry_type, _member) \ DIAG_OFF(unused-function) \ + static inline fr_dlist_head_t *fr_ ## _name ## _dlist_head(_list_type *list) \ + { return &list->_member_head; } \ +\ static inline void fr_ ## _name ## _entry_init(_entry_type *entry) \ { fr_dlist_entry_init(&entry->_member); } \ +\ + static inline void fr_ ## _name ## _init(_list_type *list) \ + { _fr_dlist_init(&list->_member_head, offsetof(_entry_type, _member), NULL); } \ \ static inline void fr_ ## _name ## _talloc_init(_list_type *list) \ { _fr_dlist_init(&list->_member_head, offsetof(_entry_type, _member), #_entry_type); } \