From ff1974c6e9aa97a6b0cf5e2ce82da70fd70c510c Mon Sep 17 00:00:00 2001 From: Xavier Chantry Date: Sat, 2 Apr 2011 20:24:40 +0200 Subject: libalpm/pkghash.c: unused variable ptr spotted by clang analyzer Signed-off-by: Xavier Chantry --- lib/libalpm/pkghash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/libalpm/pkghash.c') 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; } -- cgit v1.2.3-24-g4f1b