]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
fr_dlist_talloc_free_item returns previous item in list
authorNick Porter <nick@portercomputing.co.uk>
Wed, 24 Aug 2022 11:47:12 +0000 (12:47 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 25 Aug 2022 16:08:48 +0000 (17:08 +0100)
So retain functionality for typed versions of the function.

src/lib/util/dlist.h

index b9e20914ab0084b203398705f4994e42a3cf756c..5033a50a7067bdae70f3512534e72c323a1ed129 100644 (file)
@@ -1185,8 +1185,8 @@ DIAG_OFF(unused-function) \
        static inline   void _name ## _talloc_free_tail(FR_DLIST_HEAD(_name) *list) \
                {               fr_dlist_talloc_free_tail(&list->head); } \
 \
-       static inline   void _name ## _talloc_free_item(FR_DLIST_HEAD(_name) *list, _element_type *ptr) \
-               {               fr_dlist_talloc_free_item(&list->head, ptr); } \
+       static inline   _element_type * _name ## _talloc_free_item(FR_DLIST_HEAD(_name) *list, _element_type *ptr) \
+               {return         fr_dlist_talloc_free_item(&list->head, ptr); } \
 \
        static inline   void _name ## _talloc_free(FR_DLIST_HEAD(_name) *list) \
                {               fr_dlist_talloc_free(&list->head); } \