mirror of
https://git.proxmox.com/git/systemd
synced 2026-02-05 00:09:41 +00:00
hashmap: hashmap_contains does not need hashmap_entry
This commit is contained in:
parent
403a56bf81
commit
9f89986d2b
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user