chiark / gitweb /
hashmap: hashmap_contains does not need hashmap_entry
authorLukas Nykryn <lnykryn@redhat.com>
Thu, 23 Aug 2012 10:21:55 +0000 (12:21 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 23 Aug 2012 11:53:30 +0000 (13:53 +0200)
src/shared/hashmap.c

index be37a36..0a044b8 100644 (file)
@@ -380,14 +380,13 @@ void* hashmap_get(Hashmap *h, const void *key) {
 
 bool hashmap_contains(Hashmap *h, const void *key) {
         unsigned hash;
-        struct hashmap_entry *e;
 
         if (!h)
                 return false;
 
         hash = h->hash_func(key) % NBUCKETS;
 
-        if (!(e = hash_scan(h, hash, key)))
+        if (!hash_scan(h, hash, key))
                 return false;
 
         return true;