Patchwork [3/3] input: index_from_key(): drop unused code

login
register
mail settings
Submitter Luiz Capitulino
Date Sept. 20, 2012, 6:18 p.m.
Message ID <1348165081-28292-4-git-send-email-lcapitulino@redhat.com>
Download mbox | patch
Permalink /patch/185441/
State New
Headers show

Comments

Luiz Capitulino - Sept. 20, 2012, 6:18 p.m.
The hex key conversion is unused since last commit.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
 input.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

Patch

diff --git a/input.c b/input.c
index 187a131..da3ed27 100644
--- a/input.c
+++ b/input.c
@@ -186,8 +186,7 @@  static const int key_defs[] = {
 
 int index_from_key(const char *key)
 {
-    int i, keycode;
-    char *endp;
+    int i;
 
     for (i = 0; QKeyCode_lookup[i] != NULL; i++) {
         if (!strcmp(key, QKeyCode_lookup[i])) {
@@ -195,17 +194,6 @@  int index_from_key(const char *key)
         }
     }
 
-    if (strstart(key, "0x", NULL)) {
-        keycode = strtoul(key, &endp, 0);
-        if (*endp == '\0' && keycode >= 0x01 && keycode <= 0xff) {
-            for (i = 0; i < Q_KEY_CODE_MAX; i++) {
-                if (keycode == key_defs[i]) {
-                    break;
-                }
-            }
-        }
-    }
-
     /* Return Q_KEY_CODE_MAX if the key is invalid */
     return i;
 }