home · contact · privacy
In client: Fix FIXME in get_keyname_to_keycode().
authorChristian Heller <c.heller@plomlompom.de>
Tue, 25 Mar 2014 15:00:18 +0000 (16:00 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 25 Mar 2014 15:00:18 +0000 (16:00 +0100)
TODO
src/client/keybindings.c

diff --git a/TODO b/TODO
index ceea7b48ef8275774902cb00a0518bf263a155e8..7586040fd1a274d21c8729a2ce994097929e7364 100644 (file)
--- a/TODO
+++ b/TODO
@@ -29,5 +29,3 @@ CLIENT:
 - make log scrollable
 
 - re-organize code: empty misc.h into proper modules, split up windows.h
-
-- simplify get_keyname_to_keycode()
index b23a47efab871cb75449f9d980be9df1d564e22c..29e6c05c8150b349cb8a5a9246969a33585c4e96 100644 (file)
@@ -84,7 +84,7 @@ extern struct Command * get_command_to_keycode(struct KeyBindingDB * kbdb,
 extern char * get_keyname_to_keycode(uint16_t keycode)
 {
     char * f_name = "get_name_to_keycode()";
-    char * keyname = try_malloc(15, f_name);                /* FIXME: Why 15? */
+    char * keyname = try_malloc(10, f_name);        /* max keyname length + 1 */
     if (32 < keycode && keycode < 127)
     {
         sprintf(keyname, "%c", keycode);