From cd662fccc563e18762e2e6a16d040e0474b6e5f9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 10 Sep 2019 15:56:35 +0200 Subject: Minor cleanup of the block processor - Set the "compression failed" flag in the common implementation. - Use static initializers for the pthread code. Signed-off-by: David Oberhollenzer --- lib/sqfs/process_block.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sqfs/process_block.c') diff --git a/lib/sqfs/process_block.c b/lib/sqfs/process_block.c index f8b4d6c..3289767 100644 --- a/lib/sqfs/process_block.c +++ b/lib/sqfs/process_block.c @@ -26,8 +26,10 @@ int sqfs_block_process(sqfs_block_t *block, sqfs_compressor_t *cmp, ret = cmp->do_block(cmp, block->data, block->size, scratch, scratch_size); - if (ret < 0) + if (ret < 0) { + block->flags |= SQFS_BLK_COMPRESS_ERROR; return ret; + } if (ret > 0) { memcpy(block->data, scratch, ret); -- cgit v1.2.3