From dcabceb6268d64a16c370504de265d0dcc657301 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 5 Mar 2015 10:57:38 +0100 Subject: 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. --- player/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'player') 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); -- cgit v1.2.3