1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

hashmap: remove empty lines

This commit is contained in:
Kay Sievers 2013-08-15 15:15:36 +02:00
parent 24a0282324
commit 585275000c

View File

@ -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);