[vlc-commits] httpd: use c99 for

Rafaël Carré git at videolan.org
Sun Feb 16 12:02:53 CET 2014


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Feb 16 11:47:39 2014 +0100| [153dd61796b3f3ef49a03d53261dd40ce0afaa92] | committer: Rafaël Carré

httpd: use c99 for

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

 src/network/httpd.c |   14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index 10912d5..b90d405 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -1250,12 +1250,9 @@ static void httpd_MsgInit( httpd_message_t *msg )
 
 static void httpd_MsgClean( httpd_message_t *msg )
 {
-    int i;
-
     free( msg->psz_url );
     free( msg->psz_args );
-    for( i = 0; i < msg->i_name; i++ )
-    {
+    for (int i = 0; i < msg->i_name; i++) {
         free( msg->name[i] );
         free( msg->value[i] );
     }
@@ -1267,15 +1264,10 @@ static void httpd_MsgClean( httpd_message_t *msg )
 
 const char *httpd_MsgGet( const httpd_message_t *msg, const char *name )
 {
-    int i;
-
-    for( i = 0; i < msg->i_name; i++ )
-    {
+    for (int i = 0; i < msg->i_name; i++ )
         if( !strcasecmp( msg->name[i], name ))
-        {
             return msg->value[i];
-        }
-    }
+
     return NULL;
 }
 



More information about the vlc-commits mailing list