[vlc-commits] codec/dca: narrow scope of iteration variables

Filip Roséen git at videolan.org
Thu Oct 13 18:27:52 CEST 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Thu Oct 13 18:06:51 2016 +0200| [c22c8f40b5a00a50925c9fdf803ab98ebde91b4e] | committer: Jean-Baptiste Kempf

codec/dca: narrow scope of iteration variables

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c22c8f40b5a00a50925c9fdf803ab98ebde91b4e
---

 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++;



More information about the vlc-commits mailing list