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:
authorDan McGee <dan@archlinux.org>2011-04-05 00:48:36 -0500
committerDan McGee <dan@archlinux.org>2011-04-05 00:49:30 -0500
commitc5addd94e3a817504688e684bf62786df7faa3e7 (patch)
tree0f15c4c3ea66d617709e1f3408ea045a38463b1e /lib/libalpm/pkghash.c
parent2f71d1dc0084f7ee44afb9766e81847974820420 (diff)
parent272e9b355b17ab663ac4a0d9515d381dcf6f03ec (diff)
Merge branch 'maint'
Conflicts: lib/libalpm/be_sync.c lib/libalpm/db.c src/pacman/util.c
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;
}