[vlc-devel] commit: cleanup : remove useless headers, not used functions, msg_Err when we don't have enough memory, add a declaration ( Rafaël Carré )
git version control
git at videolan.org
Tue Mar 11 09:05:08 CET 2008
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Mar 11 00:18:30 2008 +0100| [1bbcb9f0db5392f291b31f03db9048e18db4e4bf]
cleanup : remove useless headers, not used functions, msg_Err when we don't have enough memory, add a declaration
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1bbcb9f0db5392f291b31f03db9048e18db4e4bf
---
src/config/cmdline.c | 28 ----------------------------
src/config/core.c | 15 ++-------------
src/config/file.c | 6 ------
3 files changed, 2 insertions(+), 47 deletions(-)
diff --git a/src/config/cmdline.c b/src/config/cmdline.c
index d0df458..060b7ef 100644
--- a/src/config/cmdline.c
+++ b/src/config/cmdline.c
@@ -28,14 +28,6 @@
#include <vlc/vlc.h>
#include "../libvlc.h"
#include "vlc_keys.h"
-#include "vlc_charset.h"
-
-#include <errno.h> /* errno */
-#include <limits.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h> /* getuid() */
-#endif
#ifdef HAVE_GETOPT_LONG
# ifdef HAVE_GETOPT_H
@@ -45,23 +37,6 @@
# include "../extras/getopt.h"
#endif
-#if defined(HAVE_GETPWUID)
-# include <pwd.h> /* getpwuid() */
-#endif
-
-#if defined( HAVE_SYS_STAT_H )
-# include <sys/stat.h>
-#endif
-#if defined( HAVE_SYS_TYPES_H )
-# include <sys/types.h>
-#endif
-#if defined( WIN32 )
-# if !defined( UNDER_CE )
-# include <direct.h>
-# endif
-#include <tchar.h>
-#endif
-
#include "configuration.h"
#include "modules/modules.h"
@@ -132,7 +107,6 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
p_longopts = malloc( sizeof(struct option) * (i_opts + 1) );
if( p_longopts == NULL )
{
- msg_Err( p_this, "out of memory" );
vlc_list_release( p_list );
return -1;
}
@@ -140,7 +114,6 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
psz_shortopts = malloc( sizeof( char ) * (2 * i_opts + 1) );
if( psz_shortopts == NULL )
{
- msg_Err( p_this, "out of memory" );
free( p_longopts );
vlc_list_release( p_list );
return -1;
@@ -154,7 +127,6 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc,
argv_copy = (const char**)malloc( *pi_argc * sizeof(char *) );
if( argv_copy == NULL )
{
- msg_Err( p_this, "out of memory" );
free( psz_shortopts );
free( p_longopts );
vlc_list_release( p_list );
diff --git a/src/config/core.c b/src/config/core.c
index 116f442..0241713 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -39,14 +39,6 @@
# include <unistd.h> /* getuid() */
#endif
-#ifdef HAVE_GETOPT_LONG
-# ifdef HAVE_GETOPT_H
-# include <getopt.h> /* getopt() */
-# endif
-#else
-# include "../extras/getopt.h"
-#endif
-
#if defined(HAVE_GETPWUID)
# include <pwd.h> /* getpwuid() */
#endif
@@ -72,11 +64,6 @@ static inline char *strdupnull (const char *src)
return src ? strdup (src) : NULL;
}
-static inline char *_strdupnull (const char *src)
-{
- return src ? strdup (_(src)) : NULL;
-}
-
/* Item types that use a string value (i.e. serialized in the module cache) */
int IsConfigStringType (int type)
{
@@ -729,6 +716,8 @@ char *config_GetHomeDir( void )
* - on windows that's the App Data directory;
* - on other OSes it's the same as the home directory.
*/
+char *config_GetUserDir( void ); /* XXX why does gcc wants a declaration ?
+ * --funman */
char *config_GetUserDir( void )
{
return GetDir( VLC_TRUE );
diff --git a/src/config/file.c b/src/config/file.c
index 5a1286c..61ef356 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -45,12 +45,6 @@ static inline char *strdupnull (const char *src)
return src ? strdup (src) : NULL;
}
-static inline char *_strdupnull (const char *src)
-{
- return src ? strdup (_(src)) : NULL;
-}
-
-
static FILE *config_OpenConfigFile( vlc_object_t *p_obj, const char *mode )
{
char *psz_filename = p_obj->p_libvlc->psz_configfile;
More information about the vlc-devel
mailing list