projects
/
platform
/
upstream
/
systemd.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
be37a36
..
0a044b8
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;
- 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;