From: Lennart Poettering Date: Fri, 13 Jun 2008 21:06:31 +0000 (+0000) Subject: sometimes a simple memset() is much faster X-Git-Tag: 1.0_branch~2816 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8dd59a6be940e3d08d93aa364ed6c03d37353163;p=profile%2Fivi%2Fpulseaudio.git sometimes a simple memset() is much faster git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2524 fefdeb5f-60dc-0310-8127-8f9354f1896f --- diff --git a/src/pulsecore/memchunk.c b/src/pulsecore/memchunk.c index 16a9c14..e6ad3bf 100644 --- a/src/pulsecore/memchunk.c +++ b/src/pulsecore/memchunk.c @@ -69,8 +69,7 @@ pa_memchunk* pa_memchunk_make_writable(pa_memchunk *c, size_t min) { 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; }