From: Andre Noll Date: Sun, 27 Mar 2016 03:07:52 +0000 (+0000) Subject: play.c: Simplify get_mapped_keyseqs(). X-Git-Tag: v0.5.6~25 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=9d3bea8d8175c6c4beaea5922a8ba16110698e4e;p=paraslash.git play.c: Simplify get_mapped_keyseqs(). Removing the debug log message allows to get rid of three local variables and an allocation. --- diff --git a/play.c b/play.c index 927f5dc6..59a4cec8 100644 --- 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;