[vlc-devel] [PATCH 01/13] codec/dca: narrow scope of iteration variables
Filip Roséen
filip at atch.se
Thu Oct 13 18:06:51 CEST 2016
---
modules/codec/dca.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/modules/codec/dca.c b/modules/codec/dca.c
index 311c5d1..d2f7e00 100644
--- a/modules/codec/dca.c
+++ b/modules/codec/dca.c
@@ -99,9 +99,7 @@ static void Interleave( float * p_out, const float * p_in, int i_nb_channels,
*/
static void Duplicate( float * p_out, const float * p_in )
{
- int i;
-
- for ( i = 256; i--; )
+ for ( int i = 256; i--; )
{
*p_out++ = *p_in;
*p_out++ = *p_in;
@@ -114,11 +112,10 @@ static void Duplicate( float * p_out, const float * p_in )
*/
static void Exchange( float * p_out, const float * p_in )
{
- int i;
const float * p_first = p_in + 256;
const float * p_second = p_in;
- for ( i = 0; i < 256; i++ )
+ for ( int i = 0; i < 256; i++ )
{
*p_out++ = *p_first++;
*p_out++ = *p_second++;
--
2.10.0
More information about the vlc-devel
mailing list