From 7b4573d851464af53d34820769c0914f08c5ffeb Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 11 Nov 2007 09:36:03 -0600 Subject: Remove unused and broken alpm_list_remove_node function Signed-off-by: Dan McGee --- lib/libalpm/alpm_list.c | 29 ----------------------------- lib/libalpm/alpm_list.h | 1 - 2 files changed, 30 deletions(-) diff --git a/lib/libalpm/alpm_list.c b/lib/libalpm/alpm_list.c index 6f6ee8f0..d3a7951f 100644 --- a/lib/libalpm/alpm_list.c +++ b/lib/libalpm/alpm_list.c @@ -331,35 +331,6 @@ alpm_list_t SYMEXPORT *alpm_list_remove(alpm_list_t *haystack, const void *needl return(haystack); } -/** - * @brief Remove the node from the list that it belongs to. - * - * This DOES NOT free the node. - * - * @param node the list node we're removing - * - * @return the node which took the place of this one - */ -alpm_list_t SYMEXPORT *alpm_list_remove_node(alpm_list_t *node) -{ - if(!node) return(NULL); - - alpm_list_t *ret = NULL; - - if(node->prev) { - node->prev->next = node->next; - ret = node->prev; - node->prev = NULL; - } - if(node->next) { - node->next->prev = node->prev; - ret = node->next; - node->next = NULL; - } - - return(ret); -} - /** * @brief Create a new list without any duplicates. * diff --git a/lib/libalpm/alpm_list.h b/lib/libalpm/alpm_list.h index addf9505..de35f18e 100644 --- a/lib/libalpm/alpm_list.h +++ b/lib/libalpm/alpm_list.h @@ -57,7 +57,6 @@ alpm_list_t *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_list_fn_cm alpm_list_t *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, alpm_list_fn_cmp fn); alpm_list_t *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cmp fn); alpm_list_t *alpm_list_remove(alpm_list_t *haystack, const void *needle, alpm_list_fn_cmp fn, void **data); -alpm_list_t *alpm_list_remove_node(alpm_list_t *node); alpm_list_t *alpm_list_remove_dupes(const alpm_list_t *list); alpm_list_t *alpm_list_strdup(const alpm_list_t *list); alpm_list_t *alpm_list_copy(const alpm_list_t *list); -- cgit v1.2.3-24-g4f1b