[PATCH 1/2] client: Use pa_xnew0 when creating a client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
 src/pulsecore/client.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux