chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hashmap: hashmap_contains does not need hashmap_entry
[elogind.git]
/
src
/
shared
/
hashmap.c
diff --git
a/src/shared/hashmap.c
b/src/shared/hashmap.c
index be37a3659d17a1d73bd4084d1f7af685c7050d41..0a044b85ad25a7901025d1a8ae2474a83ab00d66 100644
(file)
--- a/
src/shared/hashmap.c
+++ b/
src/shared/hashmap.c
@@
-380,14
+380,13
@@
void* hashmap_get(Hashmap *h, const void *key) {
bool hashmap_contains(Hashmap *h, const void *key) {
unsigned hash;
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 (!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;
return false;
return true;