From 50385e06ec207af0171c021f1909e9ef38c00519 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 18 Aug 2019 16:09:31 +0200 Subject: Replace update_crc32 helper function with crc32 from zlib It is optimized to the maximum and if we already use zlib anyway, why not use zlib crc32? This also makes zlib a hard dependency which also means the whole "do we have a compressor" sanity check in the build system can be removed. Signed-off-by: David Oberhollenzer --- lib/sqfs/data_writer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/sqfs') diff --git a/lib/sqfs/data_writer.c b/lib/sqfs/data_writer.c index 55c92ad..c584f1e 100644 --- a/lib/sqfs/data_writer.c +++ b/lib/sqfs/data_writer.c @@ -16,6 +16,7 @@ #include #include #include +#include struct data_writer_t { block_t *frag_block; @@ -229,7 +230,7 @@ static int handle_fragment(data_writer_t *data, block_t *blk) { file_info_t *fi = blk->user, *ref; - fi->fragment_chksum = update_crc32(0, blk->data, blk->size); + fi->fragment_chksum = crc32(0, blk->data, blk->size); ref = fragment_by_chksum(fi, fi->fragment_chksum, blk->size, data->list, data->super->block_size); -- cgit v1.2.3