]> git.sesse.net Git - vlc/commitdiff
config_GetConfigFile: remove unused parameter
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 6 May 2008 20:10:28 +0000 (23:10 +0300)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 6 May 2008 20:15:52 +0000 (23:15 +0300)
src/config/configuration.h
src/config/file.c

index 69100b9e3b7685ab90afe2d43fd71894c56ae37a..a26bd27cc4935d465e0c3d2711a3131d58f9e821 100644 (file)
@@ -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 * );
 
index 33e0d8fe51529515ceeaecee0ca17bb05b4582a7..08848ddb7014bb1f112a90f8e9f41830ee3b2ccd 100644 (file)
@@ -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
  */