From: Alejandro del Castillo Date: Wed, 10 Feb 2016 22:27:25 +0000 (-0600) Subject: active_list_add_depend: remove unused function X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7fe45f22f6292edfd7c7a3e834adaf32c18c9993;p=oweals%2Fopkg-lede.git active_list_add_depend: remove unused function Signed-off-by: Alejandro del Castillo [Jo-Philipp Wich: remove call from opkg_active_list_test] Signed-off-by: Jo-Philipp Wich --- diff --git a/libopkg/active_list.c b/libopkg/active_list.c index 2c91965..ceac6e9 100644 --- a/libopkg/active_list.c +++ b/libopkg/active_list.c @@ -118,14 +118,6 @@ void active_list_clear(struct active_list *head) active_list_init(head); } -void active_list_add_depend(struct active_list *node, - struct active_list *depend) -{ - list_del_init(&depend->node); - list_add_tail(&depend->node, &node->depend); - depend->depended = node; -} - void active_list_add(struct active_list *head, struct active_list *node) { list_del_init(&node->node); diff --git a/libopkg/active_list.h b/libopkg/active_list.h index e20a338..2775680 100644 --- a/libopkg/active_list.h +++ b/libopkg/active_list.h @@ -32,8 +32,6 @@ struct active_list *active_list_head_new(void); void active_list_head_delete(struct active_list *); void active_list_init(struct active_list *ptr); void active_list_clear(struct active_list *head); -void active_list_add_depend(struct active_list *node, - struct active_list *depend); void active_list_add(struct active_list *head, struct active_list *node); struct active_list *active_list_move_node(struct active_list *old_head, struct active_list *new_head, diff --git a/tests/opkg_active_list_test.c b/tests/opkg_active_list_test.c index 20e3eff..b377d50 100644 --- a/tests/opkg_active_list_test.c +++ b/tests/opkg_active_list_test.c @@ -39,11 +39,6 @@ static void active_test_add(struct active_list *head, struct active_test *node) active_list_add(head, &node->list); } -static void active_test_add_depend(struct active_test *A, struct active_test *B) -{ - active_list_add_depend(&A->list, &B->list); -} - /* .--A---B----C----D-----E----F | |__k---L @@ -88,15 +83,6 @@ static void make_list(struct active_list *head) active_test_add(head, M); active_test_add(head, N); active_test_add(head, O); - active_test_add_depend(H, M); - active_test_add_depend(A, G); - active_test_add_depend(A, H); - active_test_add_depend(A, I); - active_test_add_depend(A, J); - active_test_add_depend(J, O); - active_test_add_depend(C, K); - active_test_add_depend(C, L); - active_test_add_depend(L, N); } static int active_test_compare(const void *a, const void *b)