[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/15] input: index_from_key(): drop unused code
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 14/15] input: index_from_key(): drop unused code |
Date: |
Thu, 27 Sep 2012 10:28:28 -0300 |
The hex key conversion is unused since last commit.
Signed-off-by: Luiz Capitulino <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
---
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
- [Qemu-devel] [PULL 05/15] qapi: add "unix" to the set of reserved words, (continued)
- [Qemu-devel] [PULL 05/15] qapi: add "unix" to the set of reserved words, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 01/15] Make negotiation optional in QEMUMonitorProtocol, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 04/15] qapi: do not protect enum values from namespace pollution, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 02/15] Support settimeout in QEMUMonitorProtocol, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 08/15] qapi: convert add_client, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 07/15] monitor: add Error * argument to monitor_get_fd, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 11/15] hmp: dump-guest-memory: hardcode protocol argument to "file:", Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 09/15] qmp: dump-guest-memory: improve schema doc (again), Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 13/15] qmp: qmp_send_key(): accept key codes in hex, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 10/15] qmp: dump-guest-memory: don't spin if non-blocking fd would block, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 14/15] input: index_from_key(): drop unused code,
Luiz Capitulino <=
- [Qemu-devel] [PULL 12/15] input: qmp_send_key(): simplify, Luiz Capitulino, 2012/09/27
- [Qemu-devel] [PULL 15/15] block: live snapshot documentation tweaks, Luiz Capitulino, 2012/09/27