gui: Check only once for invalid key maps.
authorAndre Noll <maan@systemlinux.org>
Tue, 18 Jan 2011 20:21:48 +0000 (21:21 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 11 Feb 2011 10:25:07 +0000 (11:25 +0100)
No need to call check_key_map_args() twice.

gui.c

diff --git a/gui.c b/gui.c
index ebddd88..5ac1333 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -1396,10 +1396,6 @@ int main(int argc, char *argv[])
 
        gui_cmdline_parser(argc, argv, &conf);
        HANDLE_VERSION_FLAG("gui", conf);
-       if (check_key_map_args() < 0) {
-               fprintf(stderr, "invalid key map\n");
-               exit(EXIT_FAILURE);
-       }
        cf = configfile_exists();
        if (!cf && conf.config_file_given) {
                fprintf(stderr, "can not read config file %s\n",
@@ -1417,7 +1413,7 @@ int main(int argc, char *argv[])
        }
        loglevel = get_loglevel_by_name(conf.loglevel_arg);
        if (check_key_map_args() < 0) {
-               fprintf(stderr, "invalid key map in config file\n");
+               fprintf(stderr, "invalid key map\n");
                exit(EXIT_FAILURE);
        }
        init_theme_or_die(conf.theme_arg, &theme);