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

Rémi Denis-Courmont git at videolan.org
Thu Sep 7 21:12:14 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep  7 22:02:20 2017 +0300| [82ace8beb04cc452e08280b90fbfb718b13df533] | committer: Rémi Denis-Courmont

xcb/globalhotkeys: fix variable shadowing

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

 modules/control/globalhotkeys/xcb.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/control/globalhotkeys/xcb.c b/modules/control/globalhotkeys/xcb.c
index cc3dc688e1..3fa8a10e38 100644
--- a/modules/control/globalhotkeys/xcb.c
+++ b/modules/control/globalhotkeys/xcb.c
@@ -305,31 +305,31 @@ static bool Mapping( intf_thread_t *p_intf )
 
             const size_t max = sizeof(p_x11_modifier_ignored) /
                     sizeof(*p_x11_modifier_ignored);
-            for( unsigned int i = 0; i < max; i++ )
+            for( unsigned int j = 0; j < max; j++ )
             {
                 const unsigned i_ignored = GetModifier( p_sys->p_connection,
-                        p_sys->p_symbols, p_x11_modifier_ignored[i] );
-                if( i != 0 && i_ignored == 0)
+                        p_sys->p_symbols, p_x11_modifier_ignored[j] );
+                if( j != 0 && i_ignored == 0)
                     continue;
 
-                xcb_keycode_t *p_keys = xcb_key_symbols_get_keycode(
+                xcb_keycode_t *keycodes = xcb_key_symbols_get_keycode(
                     p_sys->p_symbols, GetX11Key( i_vlc_key & ~KEY_MODIFIER ) );
 
-                if( !p_keys )
+                if( keycodes == NULL )
                     break;
 
                 hotkey_mapping_t *p_map = realloc( p_sys->p_map,
                                   sizeof(*p_sys->p_map) * (p_sys->i_map+1) );
                 if( !p_map )
                 {
-                    free( p_keys );
+                    free( keycodes );
                     break;
                 }
                 p_sys->p_map = p_map;
                 p_map += p_sys->i_map;
                 p_sys->i_map++;
 
-                p_map->p_keys = p_keys;
+                p_map->p_keys = keycodes;
                 p_map->i_modifier = i_modifier|i_ignored;
                 p_map->i_vlc = i_vlc_key;
                 active = true;



More information about the vlc-commits mailing list