[vlc-commits] lua: remove some gratuitious casts

Rémi Denis-Courmont git at videolan.org
Sun Aug 14 16:19:25 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug 14 17:19:09 2016 +0300| [c537088a62b4a69ab3010b5613d56de2dd2c3d7b] | committer: Rémi Denis-Courmont

lua: remove some gratuitious casts

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

 modules/lua/extension.c          | 2 +-
 modules/lua/libs/configuration.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/lua/extension.c b/modules/lua/extension.c
index 3767062..32009cc 100644
--- a/modules/lua/extension.c
+++ b/modules/lua/extension.c
@@ -764,7 +764,7 @@ static int GetMenuEntries( extensions_manager_t *p_mgr, extension_t *p_ext,
                     goto exit;
                 }
                 (*pppsz_titles)[ i_idx ] = strdup( luaL_checkstring( L, -1 ) );
-                (*ppi_ids)[ i_idx ] = (uint16_t) ( luaL_checkinteger( L, -2 ) & 0xFFFF );
+                (*ppi_ids)[ i_idx ] = luaL_checkinteger( L, -2 ) & 0xFFFF;
                 i_idx++;
                 lua_pop( L, 1 );
             }
diff --git a/modules/lua/libs/configuration.c b/modules/lua/libs/configuration.c
index 6cba69a..330847c 100644
--- a/modules/lua/libs/configuration.c
+++ b/modules/lua/libs/configuration.c
@@ -84,7 +84,7 @@ static int vlclua_config_set( lua_State *L )
             break;
 
         case VLC_VAR_INTEGER:
-            config_PutInt( p_this, psz_name, (int64_t)luaL_checkinteger( L, 2 ) );
+            config_PutInt( p_this, psz_name, luaL_checkinteger( L, 2 ) );
             break;
 
         case VLC_VAR_BOOL:



More information about the vlc-commits mailing list