diff options
author | Max Kellermann <max@duempel.org> | 2009-01-15 08:35:58 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-15 08:35:58 +0100 |
commit | 6139174d8182ac6dcb8fc661d4abfaee7ba5a946 (patch) | |
tree | 95b49aa70d537d68be8d0a17f2d776012f342f69 | |
parent | 8fe867c71d4c061ab1d57ca0084e803ba67f31f9 (diff) | |
download | mpd-6139174d8182ac6dcb8fc661d4abfaee7ba5a946.tar.gz mpd-6139174d8182ac6dcb8fc661d4abfaee7ba5a946.tar.xz mpd-6139174d8182ac6dcb8fc661d4abfaee7ba5a946.zip |
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.
-rw-r--r-- | src/pcm_convert.c | 6 |
1 files 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; |