diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-10 15:56:35 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-10 15:56:35 +0200 |
commit | cd662fccc563e18762e2e6a16d040e0474b6e5f9 (patch) | |
tree | df44dc902e57960d0f193b9adc2fb71a0086a17e /lib/sqfs/process_block.c | |
parent | 1fe6b2aa4158516f9c6cf5751cc68aafef1af620 (diff) |
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/process_block.c')
-rw-r--r-- | lib/sqfs/process_block.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |