From c1a5ea0d4dceeb9354ff792fc510caa854223463 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 9 Jan 2021 23:15:42 +0100 Subject: Add a user pointer to the hash table implementation Signed-off-by: David Oberhollenzer --- lib/sqfs/block_processor/common.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/sqfs') diff --git a/lib/sqfs/block_processor/common.c b/lib/sqfs/block_processor/common.c index 1e42042..97cb790 100644 --- a/lib/sqfs/block_processor/common.c +++ b/lib/sqfs/block_processor/common.c @@ -261,15 +261,17 @@ fail_outblk: return err; } -static uint32_t chunk_info_hash(const void *key) +static uint32_t chunk_info_hash(void *user, const void *key) { const chunk_info_t *chunk = key; + (void)user; return chunk->hash; } -static bool chunk_info_equals(const void *a, const void *b) +static bool chunk_info_equals(void *user, const void *a, const void *b) { const chunk_info_t *a_ = a, *b_ = b; + (void)user; return a_->size == b_->size && a_->hash == b_->hash; } -- cgit v1.2.3