[vlc-commits] commit: system_Configure: remove unused indirection ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Mon Mar 29 22:53:54 CEST 2010
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 29 23:47:04 2010 +0300| [6a0c1f900400949e9bbe8b3ee2bd9acd187a2f48] | committer: Rémi Denis-Courmont
system_Configure: remove unused indirection
This is too late to change command line options anyway.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6a0c1f900400949e9bbe8b3ee2bd9acd187a2f48
---
src/libvlc.c | 2 +-
src/libvlc.h | 2 +-
src/misc/darwin_specific.c | 5 +++--
src/misc/linux_specific.c | 3 ++-
src/misc/not_specific.c | 3 ++-
src/win32/specific.c | 10 +++++-----
6 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index a4e0c5b..3217b9b 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -818,7 +818,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
}
/* System specific configuration */
- system_Configure( p_libvlc, &i_argc, ppsz_argv );
+ system_Configure( p_libvlc, i_argc, ppsz_argv );
/* Add service discovery modules */
psz_modules = var_InheritString( p_libvlc, "services-discovery" );
diff --git a/src/libvlc.h b/src/libvlc.h
index 777d81d..2a95283 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -42,7 +42,7 @@ extern void vlc_DeinitActions (libvlc_int_t *);
* OS-specific initialization
*/
void system_Init ( libvlc_int_t *, int *, const char *[] );
-void system_Configure ( libvlc_int_t *, int *, const char *[] );
+void system_Configure ( libvlc_int_t *, int, const char *const [] );
void system_End ( libvlc_int_t * );
/*
diff --git a/src/misc/darwin_specific.c b/src/misc/darwin_specific.c
index 4ab6524..810bd1b 100644
--- a/src/misc/darwin_specific.c
+++ b/src/misc/darwin_specific.c
@@ -162,10 +162,11 @@ void system_Init( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
/*****************************************************************************
* system_Configure: check for system specific configuration options.
*****************************************************************************/
-void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
+void system_Configure( libvlc_int_t *p_this,
+ int i_argc, const char *const ppsz_argv[] )
{
(void)p_this;
- (void)pi_argc;
+ (void)i_argc;
(void)ppsz_argv;
}
diff --git a/src/misc/linux_specific.c b/src/misc/linux_specific.c
index 5d29246..1644ce6 100644
--- a/src/misc/linux_specific.c
+++ b/src/misc/linux_specific.c
@@ -115,7 +115,8 @@ void system_Init (libvlc_int_t *libvlc, int *argc, const char *argv[])
(void)libvlc; (void)argc; (void)argv;
}
-void system_Configure (libvlc_int_t *libvlc, int *argc, const char *argv[])
+void system_Configure (libvlc_int_t *libvlc,
+ int argc, const char *const argv[])
{
(void)libvlc; (void)argc; (void)argv;
}
diff --git a/src/misc/not_specific.c b/src/misc/not_specific.c
index 6d0f369..aa6078f 100644
--- a/src/misc/not_specific.c
+++ b/src/misc/not_specific.c
@@ -39,7 +39,8 @@ void system_Init (libvlc_int_t *libvlc, int *argc, const char *argv[])
(void)libvlc; (void)argc; (void)argv;
}
-void system_Configure (libvlc_int_t *libvlc, int *argc, const char *argv[])
+void system_Configure (libvlc_int_t *libvlc,
+ int argc, const char *const argv[])
{
(void)libvlc; (void)argc; (void)argv;
}
diff --git a/src/win32/specific.c b/src/win32/specific.c
index c3e3a75..1fb2b20 100644
--- a/src/win32/specific.c
+++ b/src/win32/specific.c
@@ -134,7 +134,7 @@ typedef struct
char data[];
} vlc_ipc_data_t;
-void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv[] )
+void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_argv[] )
{
#if !defined( UNDER_CE )
/* Raise default priority of the current process */
@@ -221,24 +221,24 @@ void system_Configure( libvlc_int_t *p_this, int *pi_argc, const char *ppsz_argv
/* We assume that the remaining parameters are filenames
* and their input options */
- if( *pi_argc - 1 >= vlc_optind )
+ if( i_argc - 1 >= vlc_optind )
{
COPYDATASTRUCT wm_data;
int i_opt;
vlc_ipc_data_t *p_data;
size_t i_data = sizeof (*p_data);
- for( i_opt = vlc_optind; i_opt < *pi_argc; i_opt++ )
+ for( i_opt = vlc_optind; i_opt < i_argc; i_opt++ )
{
i_data += sizeof (size_t);
i_data += strlen( ppsz_argv[ i_opt ] ) + 1;
}
p_data = malloc( i_data );
- p_data->argc = *pi_argc - vlc_optind;
+ p_data->argc = i_argc - vlc_optind;
p_data->enqueue = var_InheritBool( p_this, "playlist-enqueue" );
i_data = 0;
- for( i_opt = vlc_optind; i_opt < *pi_argc; i_opt++ )
+ for( i_opt = vlc_optind; i_opt < i_argc; i_opt++ )
{
size_t i_len = strlen( ppsz_argv[ i_opt ] ) + 1;
/* Windows will never switch to an architecture
More information about the vlc-commits
mailing list