diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-12-04 00:39:47 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2023-01-19 16:24:56 +0100 |
commit | 4160b50a0b4c51f8b7191928cdf38d9fb0147fe2 (patch) | |
tree | 996998b7fe506101c8d91aeb71891eaac358902e /lib/sqfs/block_processor | |
parent | 42194bf57d470e548e03c44f5c2340d7d23a3ecb (diff) |
Add a helper function to initialize libsquashfs objects
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/block_processor')
-rw-r--r-- | lib/sqfs/block_processor/block_processor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqfs/block_processor/block_processor.c b/lib/sqfs/block_processor/block_processor.c index 97b8958..e223718 100644 --- a/lib/sqfs/block_processor/block_processor.c +++ b/lib/sqfs/block_processor/block_processor.c @@ -268,6 +268,8 @@ int sqfs_block_processor_create_ex(const sqfs_block_processor_desc_t *desc, if (proc == NULL) return SQFS_ERROR_ALLOC; + sqfs_object_init(proc, block_processor_destroy, NULL); + proc->max_backlog = desc->max_backlog; proc->max_block_size = desc->max_block_size; proc->frag_tbl = desc->tbl; @@ -275,7 +277,6 @@ int sqfs_block_processor_create_ex(const sqfs_block_processor_desc_t *desc, proc->file = desc->file; proc->uncmp = desc->uncmp; proc->stats.size = sizeof(proc->stats); - ((sqfs_object_t *)proc)->destroy = block_processor_destroy; /* we need at least one current data block + one fragment block */ if (proc->max_backlog < 3) |