Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/pkghash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libalpm/pkghash.c b/lib/libalpm/pkghash.c
index db98f94b..6dc43243 100644
--- a/lib/libalpm/pkghash.c
+++ b/lib/libalpm/pkghash.c
@@ -84,12 +84,11 @@ pmpkghash_t *_alpm_pkghash_create(size_t size)
static size_t get_hash_position(unsigned long name_hash, pmpkghash_t *hash)
{
size_t position;
- alpm_list_t *ptr;
position = name_hash % hash->buckets;
/* collision resolution using open addressing with linear probing */
- while((ptr = hash->hash_table[position]) != NULL) {
+ while(hash->hash_table[position] != NULL) {
position = (position + 1) % hash->buckets;
}