summaryrefslogtreecommitdiff
path: root/src/pulse
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2013-02-12 21:36:56 +0200
committerTanu Kaskinen <tanuk@iki.fi>2013-02-16 01:17:04 +0200
commit31ee1a7d54f6ba6eb96a9ae38ad9dfda72c67673 (patch)
tree8c2e890febbbff14ec8967138779149d798fffad /src/pulse
parent061878b5a47ed9aa05d12430b039874b63c29a84 (diff)
downloadpulseaudio-31ee1a7d54f6ba6eb96a9ae38ad9dfda72c67673.tar.gz
hashmap: Add pa_hashmap_remove_all()
Slightly nicer than using pa_hashmap_steal_first() in a loop.
Diffstat (limited to 'src/pulse')
-rw-r--r--src/pulse/proplist.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c
index 33b150c40..abd551bc8 100644
--- a/src/pulse/proplist.c
+++ b/src/pulse/proplist.c
@@ -652,11 +652,9 @@ int pa_proplist_contains(pa_proplist *p, const char *key) {
}
void pa_proplist_clear(pa_proplist *p) {
- struct property *prop;
pa_assert(p);
- while ((prop = pa_hashmap_steal_first(MAKE_HASHMAP(p))))
- property_free(prop);
+ pa_hashmap_remove_all(MAKE_HASHMAP(p), (pa_free_cb_t) property_free);
}
pa_proplist* pa_proplist_copy(const pa_proplist *p) {