mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
hashmap: Use pa_free_cb_t instead of pa_free2_cb_t
The previous patch removed module-gconf's dependency on the userdata pointer of the free callback, and that was the only place where the userdata pointer of pa_free2_cb_t was used, so now there's no need for pa_free2_cb_t in pa_hashmap_free(). Using pa_free_cb_t instead allows removing a significant amount of repetitive code.
This commit is contained in:
parent
dcf043842e
commit
8872c238ba
41 changed files with 112 additions and 308 deletions
|
|
@ -136,7 +136,7 @@ static void port_info_update(struct port_info *p_info, pa_device_port *port) {
|
|||
p_info->offset = port->latency_offset;
|
||||
}
|
||||
|
||||
static void port_info_free(struct port_info *p_info, void *userdata) {
|
||||
static void port_info_free(struct port_info *p_info) {
|
||||
pa_assert(p_info);
|
||||
|
||||
pa_xfree(p_info->name);
|
||||
|
|
@ -147,7 +147,7 @@ static void entry_free(struct entry* e) {
|
|||
pa_assert(e);
|
||||
|
||||
pa_xfree(e->profile);
|
||||
pa_hashmap_free(e->ports, (pa_free2_cb_t) port_info_free, NULL);
|
||||
pa_hashmap_free(e->ports, (pa_free_cb_t) port_info_free);
|
||||
|
||||
pa_xfree(e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue