diff options
-rw-r--r-- | list.c | 26 | ||||
-rw-r--r-- | list.h | 2 |
2 files changed, 0 insertions, 28 deletions
@@ -34,14 +34,6 @@ #include <log/log.h> #include "list.h" -int init_list_head(struct list_node* head) { - if (head == NULL) return -1; - - memset(head, 0, sizeof(*head)); - - return 0; -} - struct list_node* add_list_node(struct list_node* head, void* data) { /* Create a new list_node. And put 'data' into it. */ struct list_node* new_node; @@ -63,10 +55,6 @@ struct list_node* add_list_node(struct list_node* head, void* data) { return new_node; } -int is_list_empty(struct list_node* head) { - return (head == NULL || head->next == NULL); -} - /* * Delink and de-allocate 'node'. */ @@ -102,20 +90,6 @@ int remove_list_node(struct list_node* head, struct list_node* del_node) { return 0; } -void dump_list(struct list_node* head) { - struct list_node* current_node = head; - - if (head == NULL) return; - - ALOGV("List:\n"); - - while ((current_node = current_node->next)) { - if (current_node->dump) { - current_node->dump(current_node->data); - } - } -} - struct list_node* find_node(struct list_node* head, void* comparison_data) { struct list_node* current_node = head; @@ -34,8 +34,6 @@ struct list_node { void (*dump)(void* data); }; -int init_list_head(struct list_node* head); struct list_node* add_list_node(struct list_node* head, void* data); int remove_list_node(struct list_node* head, struct list_node* del_node); -void dump_list(struct list_node* head); struct list_node* find_node(struct list_node* head, void* comparison_data); |