[vlc-devel] [PATCH 12/13] access/rtsp: narrow scope of iteration variable

Filip Roséen filip at atch.se
Wed Oct 12 20:08:11 CEST 2016


---
 modules/access/rtsp/real.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/rtsp/real.c b/modules/access/rtsp/real.c
index ee60509..6d25628 100644
--- a/modules/access/rtsp/real.c
+++ b/modules/access/rtsp/real.c
@@ -361,7 +361,6 @@ static void real_calc_response_and_checksum (access_t *p_access, char *response,
 static int select_mlti_data(access_t *p_access, const char *mlti_chunk, int mlti_size, int selection, char **out) {
 
   int numrules, codec, size;
-  int i;
 
   /* MLTI chunk should begin with MLTI */
   if ((mlti_chunk[0] != 'M')
@@ -401,7 +400,8 @@ static int select_mlti_data(access_t *p_access, const char *mlti_chunk, int mlti
   mlti_chunk+=2;
 
   /* now seek to selected codec */
-  for (i=0; i<codec; i++) {
+  for( int i = 0; i < codec; i++ )
+  {
     size=BE_32(mlti_chunk);
     mlti_chunk+=size+4;
   }
-- 
2.10.0



More information about the vlc-devel mailing list