libpkgconf: Add a helper to zero `pkgconf_list_t`s

master
Dylan Baker 2022-04-01 14:14:54 -07:00 committed by Ariadne Conill
parent 21ffd343e1
commit 2d201af326
1 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,14 @@ typedef struct {
#define PKGCONF_LIST_INITIALIZER { NULL, NULL, 0 } #define PKGCONF_LIST_INITIALIZER { NULL, NULL, 0 }
static inline void
pkgconf_list_zero(pkgconf_list_t *list)
{
list->head = NULL;
list->tail = NULL;
list->length = 0;
}
static inline void static inline void
pkgconf_node_insert(pkgconf_node_t *node, void *data, pkgconf_list_t *list) pkgconf_node_insert(pkgconf_node_t *node, void *data, pkgconf_list_t *list)
{ {