[pulseaudio-commits] r2524 - /trunk/src/pulsecore/memchunk.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Jun 13 14:06:32 PDT 2008


Author: lennart
Date: Fri Jun 13 23:06:31 2008
New Revision: 2524

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2524&root=pulseaudio&view=rev
Log:
sometimes a simple memset() is much faster

Modified:
    trunk/src/pulsecore/memchunk.c

Modified: trunk/src/pulsecore/memchunk.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/memchunk.c?rev=2524&root=pulseaudio&r1=2523&r2=2524&view=diff
==============================================================================
--- trunk/src/pulsecore/memchunk.c (original)
+++ trunk/src/pulsecore/memchunk.c Fri Jun 13 23:06:31 2008
@@ -69,8 +69,7 @@
 pa_memchunk* pa_memchunk_reset(pa_memchunk *c) {
     pa_assert(c);
 
-    c->memblock = NULL;
-    c->length = c->index = 0;
+    memset(c, 0, sizeof(*c));
 
     return c;
 }




More information about the pulseaudio-commits mailing list