summaryrefslogtreecommitdiff
path: root/src/pulsecore
diff options
context:
space:
mode:
authorDavid Henningsson <david.henningsson@canonical.com>2015-09-28 14:37:49 +0200
committerDavid Henningsson <david.henningsson@canonical.com>2015-09-28 14:37:49 +0200
commit586ea6fcba9729d392e44e1f9ee8a3787f57cfac (patch)
treeaf0f0255e898c3e2a028591977472aefeeb4a7eb /src/pulsecore
parent0284363aa1da05859256befae7cbef7dd0154318 (diff)
downloadpulseaudio-586ea6fcba9729d392e44e1f9ee8a3787f57cfac.tar.gz
card: Use pa_xnew0 when creating a card
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Diffstat (limited to 'src/pulsecore')
-rw-r--r--src/pulsecore/card.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index 6f9391ec0..7f6d2558b 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -135,7 +135,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
pa_assert(data->profiles);
pa_assert(!pa_hashmap_isempty(data->profiles));
- c = pa_xnew(pa_card, 1);
+ c = pa_xnew0(pa_card, 1);
if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_CARD, c, data->namereg_fail))) {
pa_xfree(c);
@@ -172,9 +172,6 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
PA_HASHMAP_FOREACH(port, c->ports, state)
port->card = c;
- c->active_profile = NULL;
- c->save_profile = false;
-
if (data->active_profile)
if ((c->active_profile = pa_hashmap_get(c->profiles, data->active_profile)))
c->save_profile = data->save_profile;
@@ -196,9 +193,6 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
pa_assert(c->active_profile);
}
- c->userdata = NULL;
- c->set_profile = NULL;
-
pa_device_init_description(c->proplist, c);
pa_device_init_icon(c->proplist, true);
pa_device_init_intended_roles(c->proplist);