libalpm/pkghash.c: unused variable ptr

spotted by clang analyzer

Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
This commit is contained in:
Xavier Chantry 2011-04-02 20:24:40 +02:00 committed by Dan McGee
parent 40fd8123a2
commit ff1974c6e9
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}