From 2777dfe050359c359233b2f00dfb5c3b2dba4ed6 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 18 Dec 2019 15:55:03 +0100 Subject: Cleanup: merge the fstree post processing functions Instead of having 3 different functions for sorting the tree, numbering the nodes and generating a file list, that all have to be used in the right order, this commit merges them into a single "fstree_post_process" function. Signed-off-by: David Oberhollenzer --- lib/fstree/fstree_sort.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'lib/fstree/fstree_sort.c') diff --git a/lib/fstree/fstree_sort.c b/lib/fstree/fstree_sort.c index 9cb177b..124106e 100644 --- a/lib/fstree/fstree_sort.c +++ b/lib/fstree/fstree_sort.c @@ -60,13 +60,3 @@ tree_node_t *tree_node_list_sort(tree_node_t *head) return merge(tree_node_list_sort(head), tree_node_list_sort(half)); } - -void tree_node_sort_recursive(tree_node_t *n) -{ - n->data.dir.children = tree_node_list_sort(n->data.dir.children); - - for (n = n->data.dir.children; n != NULL; n = n->next) { - if (S_ISDIR(n->mode)) - tree_node_sort_recursive(n); - } -} -- cgit v1.2.3