summaryrefslogtreecommitdiff
path: root/lib/fstree/post_process.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-10-16 21:50:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-03-30 22:31:30 +0200
commite5fa9d585ed090602bcc045689046702199def86 (patch)
tree2b391a68d67972686db86f5d44a90a416695c058 /lib/fstree/post_process.c
parent5e54880a2db2aeb7a6c301a69ee2bef9a09a237f (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/fstree/post_process.c')
-rw-r--r--lib/fstree/post_process.c12
1 files changed, 0 insertions, 12 deletions
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;