Commit 61ce5ee8 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Reduce variable scope

parent 4dd64b21
...@@ -332,11 +332,11 @@ static int CacheLoadConfig( module_t *p_module, FILE *file ) ...@@ -332,11 +332,11 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
{ {
if( p_module->p_config[i].ppsz_list ) if( p_module->p_config[i].ppsz_list )
{ {
int j;
p_module->p_config[i].ppsz_list = p_module->p_config[i].ppsz_list =
xmalloc( (p_module->p_config[i].i_list+1) * sizeof(char *)); xmalloc( (p_module->p_config[i].i_list+1) * sizeof(char *));
if( p_module->p_config[i].ppsz_list ) if( p_module->p_config[i].ppsz_list )
{ {
int j;
for( j = 0; j < p_module->p_config[i].i_list; j++ ) for( j = 0; j < p_module->p_config[i].i_list; j++ )
LOAD_STRING( p_module->p_config[i].ppsz_list[j] ); LOAD_STRING( p_module->p_config[i].ppsz_list[j] );
p_module->p_config[i].ppsz_list[j] = NULL; p_module->p_config[i].ppsz_list[j] = NULL;
...@@ -344,14 +344,14 @@ static int CacheLoadConfig( module_t *p_module, FILE *file ) ...@@ -344,14 +344,14 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
} }
if( p_module->p_config[i].ppsz_list_text ) if( p_module->p_config[i].ppsz_list_text )
{ {
int j;
p_module->p_config[i].ppsz_list_text = p_module->p_config[i].ppsz_list_text =
xmalloc( (p_module->p_config[i].i_list+1) * sizeof(char *)); xmalloc( (p_module->p_config[i].i_list+1) * sizeof(char *));
if( p_module->p_config[i].ppsz_list_text ) if( p_module->p_config[i].ppsz_list_text )
{ {
for( j = 0; j < p_module->p_config[i].i_list; j++ ) int j;
LOAD_STRING( p_module->p_config[i].ppsz_list_text[j] ); for( j = 0; j < p_module->p_config[i].i_list; j++ )
p_module->p_config[i].ppsz_list_text[j] = NULL; 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 ) if( p_module->p_config[i].pi_list )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment