From 6139174d8182ac6dcb8fc661d4abfaee7ba5a946 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 15 Jan 2009 08:35:58 +0100 Subject: [PATCH] pcm_convert: removed unused variable "dest_size" dest_size is only used in an assertion. Remove its declaration and move the formula into the assertion. --- src/pcm_convert.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pcm_convert.c b/src/pcm_convert.c index 9f285eae5..67aed8185 100644 --- a/src/pcm_convert.c +++ b/src/pcm_convert.c @@ -57,7 +57,6 @@ pcm_convert_16(const struct audio_format *src_format, { const int16_t *buf; size_t len; - size_t dest_size = pcm_convert_size(src_format, src_size, dest_format); assert(dest_format->bits == 16); @@ -83,7 +82,7 @@ pcm_convert_16(const struct audio_format *src_format, dest_format->sample_rate, &len); - assert(dest_size >= len); + assert(pcm_convert_size(src_format, src_size, dest_format) >= len); memcpy(dest_buffer, buf, len); return len; @@ -98,7 +97,6 @@ pcm_convert_24(const struct audio_format *src_format, { const int32_t *buf; size_t len; - size_t dest_size = pcm_convert_size(src_format, src_size, dest_format); assert(dest_format->bits == 24); @@ -123,7 +121,7 @@ pcm_convert_24(const struct audio_format *src_format, dest_format->sample_rate, &len); - assert(dest_size >= len); + assert(pcm_convert_size(src_format, src_size, dest_format) >= len); memcpy(dest_buffer, buf, len); return len;