From daa1409632c380f88150be29889714044a843dcc Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 26 Jan 2020 15:00:03 +0100 Subject: 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 --- lib/sqfs/data_writer/common.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'lib/sqfs/data_writer/common.c') 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); } -- cgit v1.2.3