Commit 9f89986d authored by Lukas Nykryn's avatar Lukas Nykryn Committed by Zbigniew Jędrzejewski-Szmek
Browse files

hashmap: hashmap_contains does not need hashmap_entry

parent 403a56bf
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment