[vlc-commits] es_out.c: use c99 for

Rafaël Carré git at videolan.org
Mon Mar 5 10:36:40 CET 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon Mar  5 02:16:26 2012 -0500| [8bb9cc8d7a43ed870d04334f0d3c5ac322801edc] | committer: Rafaël Carré

es_out.c: use c99 for

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

 src/input/es_out.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index f7265d8..de186e5 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -417,14 +417,13 @@ static mtime_t EsOutGetWakeup( es_out_t *out )
 
 static es_out_id_t *EsOutGetFromID( es_out_t *out, int i_id )
 {
-    int i;
     if( i_id < 0 )
     {
         /* Special HACK, -i_id is the cat of the stream */
         return (es_out_id_t*)((uint8_t*)NULL-i_id);
     }
 
-    for( i = 0; i < out->p_sys->i_es; i++ )
+    for( int i = 0; i < out->p_sys->i_es; i++ )
     {
         if( out->p_sys->es[i]->i_id == i_id )
             return out->p_sys->es[i];
@@ -435,7 +434,6 @@ static es_out_id_t *EsOutGetFromID( es_out_t *out, int i_id )
 static bool EsOutDecodersIsEmpty( es_out_t *out )
 {
     es_out_sys_t      *p_sys = out->p_sys;
-    int i;
 
     if( p_sys->b_buffering && p_sys->p_pgrm )
     {
@@ -444,7 +442,7 @@ static bool EsOutDecodersIsEmpty( es_out_t *out )
             return true;
     }
 
-    for( i = 0; i < p_sys->i_es; i++ )
+    for( int i = 0; i < p_sys->i_es; i++ )
     {
         es_out_id_t *es = p_sys->es[i];
 
@@ -2840,11 +2838,10 @@ static char **LanguageSplit( const char *psz_langs, bool b_default_any )
 
 static int LanguageArrayIndex( char **ppsz_langs, char *psz_lang )
 {
-    int i;
-
-    if( !ppsz_langs || !psz_lang ) return -1;
+    if( !ppsz_langs || !psz_lang )
+        return -1;
 
-    for( i = 0; ppsz_langs[i]; i++ )
+    for( int i = 0; ppsz_langs[i]; i++ )
     {
         if( !strcasecmp( ppsz_langs[i], psz_lang ) ||
             !strcasecmp( ppsz_langs[i], "any" ) )



More information about the vlc-commits mailing list