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:
Tanu Kaskinen 2012-06-08 21:49:12 +03:00
parent d184b54d7c
commit 8239fca09f
3 changed files with 18 additions and 24 deletions

View file

@ -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);