Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/pkghash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/pkghash.c')
-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 761ca72d..b4dfcb6a 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;
}