From e5fa9d585ed090602bcc045689046702199def86 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 16 Oct 2021 21:50:40 +0200 Subject: Cleanup: remove node sorting from libfstree Always insert the tree nodes in the correct oder and remove the post-process sorting step. Signed-off-by: David Oberhollenzer --- lib/fstree/post_process.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'lib/fstree/post_process.c') diff --git a/lib/fstree/post_process.c b/lib/fstree/post_process.c index 87b3d4c..93a7664 100644 --- a/lib/fstree/post_process.c +++ b/lib/fstree/post_process.c @@ -100,16 +100,6 @@ fail_link_loop: { return -1; } -static void 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)) - sort_recursive(n); - } -} - static file_info_t *file_list_dfs(tree_node_t *n) { if (S_ISREG(n->mode)) { @@ -196,8 +186,6 @@ int fstree_post_process(fstree_t *fs) { size_t inum; - sort_recursive(fs->root); - if (resolve_hard_links_dfs(fs, fs->root)) return -1; -- cgit v1.2.3