]> git.ipfire.org Git - thirdparty/systemd.git/commit
hashmap: minor hashmap_replace optimization
authorMichal Schmidt <mschmidt@redhat.com>
Sun, 10 Aug 2014 21:35:27 +0000 (23:35 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Mon, 15 Sep 2014 14:08:50 +0000 (16:08 +0200)
commit923041cb0ab7c1795e74fa1ce4b38a6114727a3c
tree258b99d4947f14d4fe3ace5bff23bf4c8b0eaa05
parent631b9deefbef76c5f69b165f33cb46690c938c95
hashmap: minor hashmap_replace optimization

When hashmap_replace detects no such key exists yet, it calls hashmap_put that
performs the same check again. Avoid that by splitting the core of hashmap_put
into a separate function.
src/shared/hashmap.c