From 5cfb1cf46e9bbc87a6a8ebfea294be6cebf0f4a5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 12 Apr 2008 04:21:04 +0000 Subject: initialize all elements in initOutputBuffer() The current OutputBuffer object is allocated statically, i.e. it is zeroed. To be safe for other cases in the future, also initialize the other elements. git-svn-id: https://svn.musicpd.org/mpd/trunk@7337 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/outputBuffer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/outputBuffer.c') diff --git a/src/outputBuffer.c b/src/outputBuffer.c index a2cfed48e..37b0e2f20 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -28,6 +28,8 @@ void initOutputBuffer(OutputBuffer * cb, unsigned int size) memset(&cb->convState, 0, sizeof(ConvState)); cb->chunks = xmalloc(size * sizeof(*cb->chunks)); cb->size = size; + cb->begin = 0; + cb->end = 0; cb->currentChunk = -1; } -- cgit v1.2.3