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:
24a0282
)
hashmap: remove empty lines
author
Kay Sievers
<kay@vrfy.org>
Thu, 15 Aug 2013 13:15:36 +0000
(15:15 +0200)
committer
Kay Sievers
<kay@vrfy.org>
Thu, 15 Aug 2013 15:51:02 +0000
(17:51 +0200)
src/shared/hashmap.c
patch
|
blob
|
history
diff --git
a/src/shared/hashmap.c
b/src/shared/hashmap.c
index 9f7db3439728b7e89ed409ef7acfa2861f5d8e36..4ea1a0f4cb9d010dcbda92b3aa09c65de4af74ea 100644
(file)
--- a/
src/shared/hashmap.c
+++ b/
src/shared/hashmap.c
@@
-373,13
+373,10
@@
int hashmap_put(Hashmap *h, const void *key, void *value) {
assert(h);
hash = h->hash_func(key) % NBUCKETS;
-
e = hash_scan(h, hash, key);
if (e) {
-
if (e->value == value)
return 0;
-
return -EEXIST;
}
@@
-534,7
+531,6
@@
int hashmap_remove_and_replace(Hashmap *h, const void *old_key, const void *new_
return -ENOENT;
new_hash = h->hash_func(new_key) % NBUCKETS;
-
if ((k = hash_scan(h, new_hash, new_key)))
if (e != k)
remove_entry(h, k);