mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Assume that the ports hashmap of cards is always non-NULL.
The hashmap is created in pa_card_new_data_init().
This commit is contained in:
parent
d184b54d7c
commit
8239fca09f
3 changed files with 18 additions and 24 deletions
|
|
@ -142,7 +142,7 @@ static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port
|
|||
pa_log_debug("finding port %s", port->name);
|
||||
|
||||
PA_IDXSET_FOREACH(card, c->cards, state)
|
||||
if (card->ports && port == pa_hashmap_get(card->ports, port->name))
|
||||
if (port == pa_hashmap_get(card->ports, port->name))
|
||||
break;
|
||||
|
||||
if (!card) {
|
||||
|
|
@ -211,9 +211,6 @@ static void handle_all_unavailable(pa_core *core) {
|
|||
pa_device_port *port;
|
||||
void *state2;
|
||||
|
||||
if (!card->ports)
|
||||
continue;
|
||||
|
||||
PA_HASHMAP_FOREACH(port, card->ports, state2) {
|
||||
if (port->available == PA_PORT_AVAILABLE_NO)
|
||||
port_available_hook_callback(core, port, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue