mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
libalpm/pkghash.c: unused variable ptr
spotted by clang analyzer Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
This commit is contained in:
parent
40fd8123a2
commit
ff1974c6e9
@ -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)
|
static size_t get_hash_position(unsigned long name_hash, pmpkghash_t *hash)
|
||||||
{
|
{
|
||||||
size_t position;
|
size_t position;
|
||||||
alpm_list_t *ptr;
|
|
||||||
|
|
||||||
position = name_hash % hash->buckets;
|
position = name_hash % hash->buckets;
|
||||||
|
|
||||||
/* collision resolution using open addressing with linear probing */
|
/* 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;
|
position = (position + 1) % hash->buckets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user