Skip to content

Commit

Permalink
hash-tree: drop cmp_by_size()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Bruyelles <[email protected]>
  • Loading branch information
JackSlateur committed Nov 12, 2023
1 parent 9bea040 commit 0076f62
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions hash-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,22 +330,6 @@ int remove_hashed_block(struct hash_tree *tree,
return ret;
}

static int cmp_by_size(void *priv [[maybe_unused]], struct list_head *a,
struct list_head *b)
{
struct dupe_blocks_list *dla, *dlb;

dla = list_entry(a, struct dupe_blocks_list, dl_size_list);
dlb = list_entry(b, struct dupe_blocks_list, dl_size_list);

/* largest first */
if (dla->dl_num_elem > dlb->dl_num_elem)
return -1;
else if (dla->dl_num_elem < dlb->dl_num_elem)
return 1;
return 0;
}

void init_hash_tree(struct hash_tree *tree)
{
tree->root = RB_ROOT;
Expand Down

0 comments on commit 0076f62

Please sign in to comment.