summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-03-05 10:57:38 +0100
committerwm4 <wm4@nowhere>2015-03-05 10:57:38 +0100
commitdcabceb6268d64a16c370504de265d0dcc657301 (patch)
tree0d5d2731ae81a153d0a467a4dc0cfe932255e942 /player
parentae33ec2c5b923667a410eb6fda468fc977948098 (diff)
downloadmpv-dcabceb6268d64a16c370504de265d0dcc657301.tar.bz2
mpv-dcabceb6268d64a16c370504de265d0dcc657301.tar.xz
player: minor simplification
argv is always terminated with a NULL, so we don't need to drag argc along. Simplifies the following commit a little bit.
Diffstat (limited to 'player')
-rw-r--r--player/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/player/main.c b/player/main.c
index dbd969ecef..bf684cbae0 100644
--- a/player/main.c
+++ b/player/main.c
@@ -476,7 +476,7 @@ int mpv_main(int argc, char *argv[])
opts->verbose = atoi(verbose_env);
// Preparse the command line
- m_config_preparse_command_line(mpctx->mconfig, mpctx->global, argc, argv);
+ m_config_preparse_command_line(mpctx->mconfig, mpctx->global, argv);
if (mpctx->opts->use_terminal && cas_terminal_owner(NULL, mpctx))
terminal_init();
@@ -484,7 +484,7 @@ int mpv_main(int argc, char *argv[])
mp_msg_update_msglevels(mpctx->global);
MP_VERBOSE(mpctx, "Command line:");
- for (int i = 0; i < argc; i++)
+ for (int i = 0; argv[i]; i++)
MP_VERBOSE(mpctx, " '%s'", argv[i]);
MP_VERBOSE(mpctx, "\n");
@@ -493,7 +493,7 @@ int mpv_main(int argc, char *argv[])
mp_parse_cfgfiles(mpctx);
int r = m_config_parse_mp_command_line(mpctx->mconfig, mpctx->playlist,
- mpctx->global, argc, argv);
+ mpctx->global, argv);
if (r < 0) {
if (r <= M_OPT_EXIT) {
return prepare_exit_cplayer(mpctx, EXIT_NONE);