]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - play.c
play: Always check arg count and init keymap.
[paraslash.git] / play.c
diff --git a/play.c b/play.c
index 2155ebf824d45bb578bcb0b782c565be42e349b2..bd94fcd9dedb8481185b79320919bce7ede63c70 100644 (file)
--- a/play.c
+++ b/play.c
@@ -1,8 +1,4 @@
-/*
- * Copyright (C) 2012 Andre Noll <maan@tuebingen.mpg.de>
- *
- * Licensed under the GPL v2. For licencing details see COPYING.
- */
+/* Copyright (C) 2012 Andre Noll <maan@tuebingen.mpg.de>, see file COPYING. */
 
 /** \file play.c Paraslash's standalone player. */
 
@@ -182,7 +178,7 @@ static void parse_config_or_die(int argc, char *argv[])
                if (ret == -ERRNO_TO_PARA_ERROR(ENOENT) && OPT_GIVEN(CONFIG_FILE))
                        goto free_cf;
                ret = 0;
-               goto free_cf;
+               goto check_arg_count;
        }
        ret = lls(lls_convert_config(map, sz, NULL, &cf_argv, &errctx));
        para_munmap(map, sz);
@@ -200,7 +196,7 @@ static void parse_config_or_die(int argc, char *argv[])
        lls_free_parse_result(play_lpr, cmd);
        play_lpr = merged_lpr;
        loglevel = OPT_UINT32_VAL(LOGLEVEL);
-
+check_arg_count:
        ret = lls(lls_check_arg_count(play_lpr, 1, INT_MAX, &errctx));
        if (ret < 0)
                goto free_cf;