Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv3379/core

Modified Files:
        control.c 
Log Message:
Optimized allocation of volatile data

Index: control.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/control.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- control.c   1 Apr 2003 13:55:43 -0000       1.29
+++ control.c   2 Apr 2003 13:11:47 -0000       1.30
@@ -189,12 +189,11 @@
        snd_runtime_check(control != NULL, return NULL);
        snd_runtime_check(control->count > 0, return NULL);
        kctl = (snd_kcontrol_t *)snd_magic_kcalloc(snd_kcontrol_t,
-                                                  sizeof(snd_kcontrol_volatile_t) * 
control->count,
+                                                  sizeof(snd_kcontrol_volatile_t) * 
(control->count - 1),
                                                   GFP_KERNEL);
        if (kctl == NULL)
                return NULL;
        *kctl = *control;
-       kctl->vd = (snd_kcontrol_volatile_t *)(kctl + 1);
        for (idx = 0; idx < kctl->count; idx++)
                kctl->vd[idx].access = access;
        return kctl;



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to