summaryrefslogtreecommitdiff
path: root/lib/sqfs/data_writer/common.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-26 15:00:03 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-26 15:09:06 +0100
commitdaa1409632c380f88150be29889714044a843dcc (patch)
tree20cc4079c6812c97eaa960f81f7e1cfe863013bf /lib/sqfs/data_writer/common.c
parent4f92cc1f0ab3202d0949d316e85f486c4312358b (diff)
Cleanup: Move fragment deduplication code over to fragment table
This removes further clutter from the data writer. Any future efforts on making fragment by hash lookup faster can focus on that area only and don't clutter the block processor. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/data_writer/common.c')
-rw-r--r--lib/sqfs/data_writer/common.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/sqfs/data_writer/common.c b/lib/sqfs/data_writer/common.c
index bc6bac4..b207291 100644
--- a/lib/sqfs/data_writer/common.c
+++ b/lib/sqfs/data_writer/common.c
@@ -29,7 +29,6 @@ int data_writer_init(sqfs_data_writer_t *proc, size_t max_block_size,
proc->cmp = cmp;
proc->file = file;
proc->max_blocks = INIT_BLOCK_COUNT;
- proc->frag_list_max = INIT_BLOCK_COUNT;
proc->frag_tbl = sqfs_frag_table_create(0);
if (proc->frag_tbl == NULL)
@@ -39,11 +38,6 @@ int data_writer_init(sqfs_data_writer_t *proc, size_t max_block_size,
if (proc->blocks == NULL)
return -1;
- proc->frag_list = alloc_array(sizeof(proc->frag_list[0]),
- proc->frag_list_max);
- if (proc->frag_list == NULL)
- return -1;
-
return 0;
}
@@ -55,7 +49,6 @@ void data_writer_cleanup(sqfs_data_writer_t *proc)
free_blk_list(proc->done);
free(proc->blk_current);
free(proc->frag_block);
- free(proc->frag_list);
free(proc->blocks);
free(proc);
}