X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fconfig%2Fcmdline.c;h=4899129088da9d81ebc40fc33b1c3af1e1ae9c0e;hb=b99613a3e91faf43a090c46176c046a5844ef820;hp=060b7efb1544c68080a4fa1904c4b3130e279888;hpb=1bbcb9f0db5392f291b31f03db9048e18db4e4bf;p=vlc diff --git a/src/config/cmdline.c b/src/config/cmdline.c index 060b7efb15..4899129088 100644 --- a/src/config/cmdline.c +++ b/src/config/cmdline.c @@ -25,7 +25,7 @@ # include "config.h" #endif -#include +#include #include "../libvlc.h" #include "vlc_keys.h" @@ -40,6 +40,8 @@ #include "configuration.h" #include "modules/modules.h" +#include + /***************************************************************************** * config_LoadCmdLine: parse command line ***************************************************************************** @@ -51,7 +53,7 @@ *****************************************************************************/ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, const char *ppsz_argv[], - vlc_bool_t b_ignore_errors ) + bool b_ignore_errors ) { int i_cmd, i_index, i_opts, i_shortopts, flag, i_verbose = 0; module_t *p_parser; @@ -74,12 +76,10 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, /* GDMF!... I can't do this or else the MacOSX window server will * not pick up the PSN and not register the app and we crash... * hence the following kludge otherwise we'll get confused w/ argv[1] - * being an input file name */ -#if 0 - ppsz_argv[ 1 ] = NULL; -#endif - *pi_argc = *pi_argc - 1; - pi_argc--; + * being an input file name. + * As there won't be any more args to parse, just exit. */ + assert( *pi_argc == 2 ); + *pi_argc = 1; return 0; } #endif