[vlc-commits] Reduce variable scope
Rémi Denis-Courmont
git at videolan.org
Fri Mar 16 10:26:20 CET 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 16 11:23:53 2012 +0200| [61ce5ee858be5402694b579a3c3ce510a9907da1] | committer: Rémi Denis-Courmont
Reduce variable scope
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=61ce5ee858be5402694b579a3c3ce510a9907da1
---
src/modules/cache.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index c71dde2..808f0fa 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -332,11 +332,11 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
{
if( p_module->p_config[i].ppsz_list )
{
- int j;
p_module->p_config[i].ppsz_list =
xmalloc( (p_module->p_config[i].i_list+1) * sizeof(char *));
if( p_module->p_config[i].ppsz_list )
{
+ int j;
for( j = 0; j < p_module->p_config[i].i_list; j++ )
LOAD_STRING( p_module->p_config[i].ppsz_list[j] );
p_module->p_config[i].ppsz_list[j] = NULL;
@@ -344,14 +344,14 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
}
if( p_module->p_config[i].ppsz_list_text )
{
- int j;
p_module->p_config[i].ppsz_list_text =
xmalloc( (p_module->p_config[i].i_list+1) * sizeof(char *));
if( p_module->p_config[i].ppsz_list_text )
{
- for( j = 0; j < p_module->p_config[i].i_list; j++ )
- LOAD_STRING( p_module->p_config[i].ppsz_list_text[j] );
- p_module->p_config[i].ppsz_list_text[j] = NULL;
+ int j;
+ for( j = 0; j < p_module->p_config[i].i_list; j++ )
+ LOAD_STRING( p_module->p_config[i].ppsz_list_text[j] );
+ p_module->p_config[i].ppsz_list_text[j] = NULL;
}
}
if( p_module->p_config[i].pi_list )
More information about the vlc-commits
mailing list