chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
403a56b
)
hashmap: hashmap_contains does not need hashmap_entry
author
Lukas Nykryn
<lnykryn@redhat.com>
Thu, 23 Aug 2012 10:21:55 +0000
(12:21 +0200)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Thu, 23 Aug 2012 11:53:30 +0000
(13:53 +0200)
src/shared/hashmap.c
patch
|
blob
|
history
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;