[vlc-commits] commit: lua: cosmetics. ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Mon Oct 25 23:02:32 CEST 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Oct 25 15:15:45 2010 +0200| [f5dbbddb72e2723edcf049afc9dfe9d146fccb6f] | committer: Rémi Duraffort
lua: cosmetics.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f5dbbddb72e2723edcf049afc9dfe9d146fccb6f
---
modules/misc/lua/vlc.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/modules/misc/lua/vlc.c b/modules/misc/lua/vlc.c
index 6d32ea8..9c89063 100644
--- a/modules/misc/lua/vlc.c
+++ b/modules/misc/lua/vlc.c
@@ -256,8 +256,7 @@ int vlclua_dir_list( vlc_object_t *p_this, const char *luadirname,
void vlclua_dir_list_free( char **ppsz_dir_list )
{
- char **ppsz_dir;
- for( ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
+ for( char **ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
free( *ppsz_dir );
free( ppsz_dir_list );
}
@@ -272,20 +271,19 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
void * user_data)
{
char **ppsz_dir_list = NULL;
+ int i_ret;
- int i_ret = vlclua_dir_list( p_this, luadirname, &ppsz_dir_list );
- if( i_ret != VLC_SUCCESS )
+ if((i_ret = vlclua_dir_list( p_this, luadirname, &ppsz_dir_list ) != VLC_SUCCESS))
return i_ret;
- i_ret = VLC_EGENERIC;
+ i_ret = VLC_EGENERIC;
for( char **ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
{
char **ppsz_filelist;
- int i_files;
msg_Dbg( p_this, "Trying Lua scripts in %s", *ppsz_dir );
- i_files = vlc_scandir( *ppsz_dir, &ppsz_filelist, file_select,
- file_compare );
+ int i_files = vlc_scandir( *ppsz_dir, &ppsz_filelist, file_select,
+ file_compare );
if( i_files < 0 )
continue;
@@ -326,9 +324,9 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
char *vlclua_find_file( vlc_object_t *p_this, const char *psz_luadirname, const char *psz_name )
{
char **ppsz_dir_list = NULL;
- char **ppsz_dir;
vlclua_dir_list( p_this, psz_luadirname, &ppsz_dir_list );
- for( ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
+
+ for( char **ppsz_dir = ppsz_dir_list; *ppsz_dir; ppsz_dir++ )
{
for( const char **ppsz_ext = ppsz_lua_exts; *ppsz_ext; ppsz_ext++ )
{
More information about the vlc-commits
mailing list