[vlc-commits] lua: fix variable shadowing

Rémi Denis-Courmont git at videolan.org
Sat Mar 2 20:30:01 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar  2 21:23:27 2019 +0200| [489c87b5c09da1558759532c30e62853a020c027] | committer: Rémi Denis-Courmont

lua: fix variable shadowing

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

 modules/lua/extension.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/lua/extension.c b/modules/lua/extension.c
index 619a36b956..2d3c9813a9 100644
--- a/modules/lua/extension.c
+++ b/modules/lua/extension.c
@@ -378,7 +378,7 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_filename,
                 {
                     /* Key is at index -2 and value at index -1. Discard key */
                     const char *psz_cap = luaL_checkstring( L, -1 );
-                    bool b_ok = false;
+                    bool found = false;
                     /* Find this capability's flag */
                     for( size_t i = 0; i < sizeof(caps)/sizeof(caps[0]); i++ )
                     {
@@ -386,11 +386,11 @@ int ScanLuaCallback( vlc_object_t *p_this, const char *psz_filename,
                         {
                             /* Flag it! */
                             p_ext->p_sys->i_capabilities |= 1 << i;
-                            b_ok = true;
+                            found = true;
                             break;
                         }
                     }
-                    if( !b_ok )
+                    if( !found )
                     {
                         msg_Warn( p_mgr, "Extension capability '%s' unknown in"
                                   " script %s", psz_cap, psz_script );



More information about the vlc-commits mailing list