[vlc-commits] video_filter: remoteosd: use C99 loop declarations

Tristan Matthews git at videolan.org
Mon Aug 31 20:11:00 CEST 2015


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Mon Aug 31 11:07:04 2015 -0400| [f7310e0e2da5f262cace84a9278b6550ce2576c9] | committer: Tristan Matthews

video_filter: remoteosd: use C99 loop declarations

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

 modules/video_filter/remoteosd.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/modules/video_filter/remoteosd.c b/modules/video_filter/remoteosd.c
index 596b3ae..f9a2f2f 100644
--- a/modules/video_filter/remoteosd.c
+++ b/modules/video_filter/remoteosd.c
@@ -1314,16 +1314,15 @@ static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
 static void vnc_encrypt_bytes( unsigned char *bytes, char *passwd )
 {
     unsigned char key[8];
-    unsigned int i;
 
-    for (i = 0; i < 8; i++)
+    for( unsigned i = 0; i < 8; i++ )
         key[i] = i < strlen( passwd ) ? passwd[i] : '\0';
 
     gcry_cipher_hd_t ctx;
     gcry_cipher_open( &ctx, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB,0);
 
     /* reverse bits of the key */
-    for( i = 0 ; i < 8 ; i ++ )
+    for( unsigned i = 0 ; i < 8 ; i++ )
         key[i] =
             (key[i] >> 7) +
             (((key[i] >> 6) & 0x01 ) << 1 ) +



More information about the vlc-commits mailing list