From a6b5b60942b4e28965f10cb107d4f94aaf756bc1 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 8 May 2006 19:03:07 +0000 Subject: Fiddling with llist to make memory management easier. Specifically, the option to delete the contents of the list when we delete the list is a good thing. --- include/libbb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 4823979..39361a2 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -477,8 +477,8 @@ typedef struct llist_s { } llist_t; extern llist_t *llist_add_to(llist_t *old_head, char *new_item); extern llist_t *llist_add_to_end(llist_t *list_head, char *data); -extern llist_t *llist_free_one(llist_t *elm); -extern void llist_free(llist_t *elm); +extern void *llist_pop(llist_t **elm); +extern void llist_free(llist_t *elm, void (*freeit)(void *data)); extern void print_login_issue(const char *issue_file, const char *tty); extern void print_login_prompt(void); -- cgit v1.1