Commit 080a076a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

config_GetConfigFile: remove unused parameter

parent 146dad54
......@@ -44,7 +44,6 @@ void config_UnsetCallbacks( module_config_t *, size_t );
int __config_LoadCmdLine ( vlc_object_t *, int *, const char *[], bool );
char *config_GetHomeDir ( void );
char *config_GetConfigFile ( libvlc_int_t * );
char *config_GetCustomConfigFile( libvlc_int_t * );
int __config_LoadConfigFile( vlc_object_t *, const char * );
......
......@@ -44,6 +44,20 @@ static inline char *strdupnull (const char *src)
return src ? strdup (src) : NULL;
}
/**
* Get the user's configuration file
*/
static char *config_GetConfigFile( void )
{
char *psz_dir = config_GetUserConfDir();
char *psz_configfile;
if( asprintf( &psz_configfile, "%s" DIR_SEP CONFIG_FILE, psz_dir ) == -1 )
psz_configfile = NULL;
free( psz_dir );
return psz_configfile;
}
static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
{
char *psz_filename = libvlc_priv (p_obj->p_libvlc)->psz_configfile;
......@@ -51,7 +65,7 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
if( !psz_filename )
{
psz_filename = config_GetConfigFile( p_obj->p_libvlc );
psz_filename = config_GetConfigFile();
}
msg_Dbg( p_obj, "opening config file (%s)", psz_filename );
......@@ -665,20 +679,6 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
return SaveConfigFile( p_this, psz_module_name, false );
}
/**
* Get the user's configuration file
*/
char *config_GetConfigFile( libvlc_int_t *p_libvlc )
{
char *psz_dir = config_GetUserConfDir();
char *psz_configfile;
if( asprintf( &psz_configfile, "%s" DIR_SEP CONFIG_FILE, psz_dir ) == -1 )
psz_configfile = NULL;
free( psz_dir );
return psz_configfile;
}
/**
* Get the user's configuration file when given with the --config option
*/
......
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