]> git.tue.mpg.de Git - paraslash.git/commitdiff
play.c: Simplify get_mapped_keyseqs().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 27 Mar 2016 03:07:52 +0000 (03:07 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 15 May 2016 10:19:18 +0000 (12:19 +0200)
Removing the debug log message allows to get rid of three
local variables and an allocation.

play.c

diff --git a/play.c b/play.c
index 927f5dc69df9c8a44d60c5d7221c626ccc0efaea..59a4cec85ce26bb5d5d57c7926ad70245a4c656b 100644 (file)
--- a/play.c
+++ b/play.c
@@ -620,15 +620,8 @@ static char **get_mapped_keyseqs(void)
 
        result = para_malloc((NUM_MAPPED_KEYS + 1) * sizeof(char *));
        FOR_EACH_MAPPED_KEY(i) {
-               int idx = get_key_map_idx(i);
                char *seq = get_key_map_seq(i);
-               char *cmd = get_key_map_cmd(i);
-               bool internal = is_internal_key(i);
-               PARA_DEBUG_LOG("%s key sequence #%d: %s -> %s\n",
-                       internal? "internal" : "user-defined",
-                       idx, seq, cmd);
                result[i] = seq;
-               free(cmd);
        }
        result[i] = NULL;
        return result;