mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
card: Remove some unnecessary checks.
This commit is contained in:
parent
78df02dba6
commit
dd6c8ae38f
1 changed files with 6 additions and 10 deletions
|
|
@ -181,20 +181,16 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
|
||||||
|
|
||||||
/* As a minor optimization we just steal the list instead of
|
/* As a minor optimization we just steal the list instead of
|
||||||
* copying it here */
|
* copying it here */
|
||||||
c->profiles = data->profiles;
|
pa_assert_se(c->profiles = data->profiles);
|
||||||
data->profiles = NULL;
|
data->profiles = NULL;
|
||||||
c->ports = data->ports;
|
pa_assert_se(c->ports = data->ports);
|
||||||
data->ports = NULL;
|
data->ports = NULL;
|
||||||
|
|
||||||
if (c->profiles) {
|
PA_HASHMAP_FOREACH(profile, c->profiles, state)
|
||||||
PA_HASHMAP_FOREACH(profile, c->profiles, state)
|
profile->card = c;
|
||||||
profile->card = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (c->ports) {
|
PA_HASHMAP_FOREACH(port, c->ports, state)
|
||||||
PA_HASHMAP_FOREACH(port, c->ports, state)
|
port->card = c;
|
||||||
port->card = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
c->active_profile = NULL;
|
c->active_profile = NULL;
|
||||||
c->save_profile = FALSE;
|
c->save_profile = FALSE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue