mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
module: Remove redundant core argument from pa_module_unload()
pa_module_unload() takes two pointers: pa_module and pa_core. The pa_core pointer is also available via the pa_module object, so the pa_core argument is redundant [David Henningsson: Rebased to git HEAD]
This commit is contained in:
parent
cda1a5e897
commit
96b368b960
6 changed files with 8 additions and 9 deletions
|
|
@ -259,14 +259,13 @@ static void pa_module_free(pa_module *m) {
|
|||
pa_xfree(m);
|
||||
}
|
||||
|
||||
void pa_module_unload(pa_core *c, pa_module *m, bool force) {
|
||||
pa_assert(c);
|
||||
void pa_module_unload(pa_module *m, bool force) {
|
||||
pa_assert(m);
|
||||
|
||||
if (m->core->disallow_module_loading && !force)
|
||||
return;
|
||||
|
||||
if (!(m = pa_idxset_remove_by_data(c->modules, m, NULL)))
|
||||
if (!(m = pa_idxset_remove_by_data(m->core->modules, m, NULL)))
|
||||
return;
|
||||
|
||||
pa_module_free(m);
|
||||
|
|
@ -334,7 +333,7 @@ static void defer_cb(pa_mainloop_api*api, pa_defer_event *e, void *userdata) {
|
|||
api->defer_enable(e, 0);
|
||||
|
||||
while ((m = pa_hashmap_first(c->modules_pending_unload)))
|
||||
pa_module_unload(c, m, true);
|
||||
pa_module_unload(m, true);
|
||||
}
|
||||
|
||||
void pa_module_unload_request(pa_module *m, bool force) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue