[vlc-devel] commit: config_GetConfigFile: remove unused parameter ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue May 6 22:14:38 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Tue May  6 23:10:28 2008 +0300| [080a076a49837a7643778b78db14727017ec2bfb]

config_GetConfigFile: remove unused parameter

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=080a076a49837a7643778b78db14727017ec2bfb
---

 src/config/configuration.h |    1 -
 src/config/file.c          |   30 +++++++++++++++---------------
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/src/config/configuration.h b/src/config/configuration.h
index 69100b9..a26bd27 100644
--- a/src/config/configuration.h
+++ b/src/config/configuration.h
@@ -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 * );
 
diff --git a/src/config/file.c b/src/config/file.c
index 33e0d8f..08848dd 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -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 );
@@ -666,20 +680,6 @@ int __config_SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name )
 }
 
 /**
- * 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
  */
 char *config_GetCustomConfigFile( libvlc_int_t *p_libvlc )




More information about the vlc-devel mailing list