[vlc-commits] globalhotleys/xcb: fix variable shadowing

Rémi Denis-Courmont git at videolan.org
Sun Jul 23 16:53:35 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 23 16:46:20 2017 +0300| [edc33fede5ab416b3354289d29c7e6151e8e31f4] | committer: Rémi Denis-Courmont

globalhotleys/xcb: fix variable shadowing

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

 modules/control/globalhotkeys/xcb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index f083b81336..aceb3cbeda 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -192,16 +192,14 @@ static unsigned GetModifier( xcb_connection_t *p_connection, xcb_key_symbols_t *
     if( !p_keys )
         goto end;
 
-    int i = 0;
     bool no_modifier = true;
-    while( p_keys[i] != XCB_NO_SYMBOL )
+    for( int i = 0; p_keys[i] != XCB_NO_SYMBOL; i++ )
     {
         if( p_keys[i] != 0 )
         {
             no_modifier = false;
             break;
         }
-        i++;
     }
 
     if( no_modifier )



More information about the vlc-commits mailing list