[pulseaudio-commits] src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Fri Oct 16 12:06:02 PDT 2015


 src/pulsecore/card.c |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 336a2cc6f05bb6b2ea35aab9172445b0830c553a
Author: David Henningsson <david.henningsson at canonical.com>
Date:   Tue May 5 17:01:07 2015 +0200

    card: Use pa_xmalloc0 when creating card profiles
    
    Signed-off-by: David Henningsson <david.henningsson at canonical.com>

diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
index 7f6d255..c8b97b7 100644
--- a/src/pulsecore/card.c
+++ b/src/pulsecore/card.c
@@ -41,14 +41,9 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
 
     pa_assert(name);
 
-    c = pa_xmalloc(PA_ALIGN(sizeof(pa_card_profile)) + extra);
-    c->card = NULL;
+    c = pa_xmalloc0(PA_ALIGN(sizeof(pa_card_profile)) + extra);
     c->name = pa_xstrdup(name);
     c->description = pa_xstrdup(description);
-
-    c->priority = 0;
-    c->n_sinks = c->n_sources = 0;
-    c->max_sink_channels = c->max_source_channels = 0;
     c->available = PA_AVAILABLE_UNKNOWN;
 
     return c;



More information about the pulseaudio-commits mailing list