struct links_entry {
struct links_entry *next;
struct links_entry *previous;
- int links; /* # links not yet seen */
- int hash;
struct archive_entry *canonical;
struct archive_entry *entry;
+ size_t hash;
+ unsigned int links; /* # links not yet seen */
};
struct archive_entry_linkresolver {
struct archive_entry *entry)
{
struct links_entry *le;
- int hash, bucket;
+ size_t hash, bucket;
dev_t dev;
int64_t ino;
dev = archive_entry_dev(entry);
ino = archive_entry_ino64(entry);
- hash = (int)(dev ^ ino);
+ hash = (size_t)(dev ^ ino);
/* Try to locate this entry in the links cache. */
bucket = hash & (res->number_buckets - 1);
/* Free a held entry. */
if (res->spare != NULL) {
archive_entry_free(res->spare->canonical);
+ archive_entry_free(res->spare->entry);
free(res->spare);
res->spare = NULL;
}
struct archive_entry *entry)
{
struct links_entry *le;
- int hash, bucket;
+ size_t hash, bucket;
/* Add this entry to the links cache. */
le = calloc(sizeof(struct links_entry), 1);