[pulseaudio-commits] 2 commits - src/pulsecore
David Henningsson
diwic at kemper.freedesktop.org
Mon Sep 28 05:41:24 PDT 2015
src/pulsecore/card.c | 8 +-------
src/pulsecore/client.c | 6 +-----
2 files changed, 2 insertions(+), 12 deletions(-)
New commits:
commit 586ea6fcba9729d392e44e1f9ee8a3787f57cfac
Author: David Henningsson <david.henningsson at canonical.com>
Date: Mon Sep 28 14:37:49 2015 +0200
card: Use pa_xnew0 when creating a card
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index 6f9391e..7f6d255 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);
commit 0284363aa1da05859256befae7cbef7dd0154318
Author: David Henningsson <david.henningsson at canonical.com>
Date: Mon Sep 28 14:36:23 2015 +0200
client: Use pa_xnew0 when creating a client
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
diff --git a/src/pulsecore/client.c b/src/pulsecore/client.c
index 003bcf8..2e6af47 100644
--- a/src/pulsecore/client.c
+++ b/src/pulsecore/client.c
@@ -60,7 +60,7 @@ pa_client *pa_client_new(pa_core *core, pa_client_new_data *data) {
if (pa_hook_fire(&core->hooks[PA_CORE_HOOK_CLIENT_NEW], data) < 0)
return NULL;
- c = pa_xnew(pa_client, 1);
+ c = pa_xnew0(pa_client, 1);
c->core = core;
c->proplist = pa_proplist_copy(data->proplist);
c->driver = pa_xstrdup(pa_path_get_filename(data->driver));
@@ -69,10 +69,6 @@ pa_client *pa_client_new(pa_core *core, pa_client_new_data *data) {
c->sink_inputs = pa_idxset_new(NULL, NULL);
c->source_outputs = pa_idxset_new(NULL, NULL);
- c->userdata = NULL;
- c->kill = NULL;
- c->send_event = NULL;
-
pa_assert_se(pa_idxset_put(core->clients, c, &c->index) >= 0);
pa_log_info("Created %u \"%s\"", c->index, pa_strnull(pa_proplist_gets(c->proplist, PA_PROP_APPLICATION_NAME)));
More information about the pulseaudio-commits
mailing list