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 927f5dc..59a4cec 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;