qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: akong@redhat.com, eblake@redhat.com, avi@redhat.com, armbru@redhat.com
Subject: [Qemu-devel] [PATCH 3/3] input: index_from_key(): drop unused code
Date: Wed, 26 Sep 2012 17:25:38 -0300	[thread overview]
Message-ID: <1348691138-12879-4-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1348691138-12879-1-git-send-email-lcapitulino@redhat.com>

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(-)

diff --git a/input.c b/input.c
index 76ade64..25d3973 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;
 }
-- 
1.7.12.315.g682ce8b

  parent reply	other threads:[~2012-09-26 20:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 20:25 [Qemu-devel] [PATCH v3 0/3] qmp: send-key: accept key codes in hex Luiz Capitulino
2012-09-26 20:25 ` [Qemu-devel] [PATCH 1/3] input: qmp_send_key(): simplify Luiz Capitulino
2012-09-27  9:50   ` Markus Armbruster
2012-09-26 20:25 ` [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex Luiz Capitulino
2012-09-27 11:42   ` Markus Armbruster
2012-09-27 12:57     ` Luiz Capitulino
2012-09-26 20:25 ` Luiz Capitulino [this message]
2012-09-26 21:23 ` [Qemu-devel] [PATCH v3 0/3] qmp: send-key: " Eric Blake
2012-09-27  9:19 ` Avi Kivity
2012-09-27 12:14   ` Luiz Capitulino
2012-09-27 11:43 ` Markus Armbruster
  -- strict thread matches above, loose matches on Subject: below --
2012-09-21 14:55 [Qemu-devel] [PATCH v2 0/3]: " Luiz Capitulino
2012-09-21 14:55 ` [Qemu-devel] [PATCH 3/3] input: index_from_key(): drop unused code Luiz Capitulino
2012-09-20 18:17 [Qemu-devel] [PATCH 0/3]: qmp: send-key: accept key codes in hex Luiz Capitulino
2012-09-20 18:18 ` [Qemu-devel] [PATCH 3/3] input: index_from_key(): drop unused code Luiz Capitulino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348691138-12879-4-git-send-email-lcapitulino@redhat.com \
    --to=lcapitulino@redhat.com \
    --cc=akong@redhat.com \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).