From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGyAD-0008FM-7N for qemu-devel@nongnu.org; Wed, 26 Sep 2012 16:24:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGyAC-0008GJ-89 for qemu-devel@nongnu.org; Wed, 26 Sep 2012 16:24:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGyAC-0008G8-05 for qemu-devel@nongnu.org; Wed, 26 Sep 2012 16:24:56 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8QKOtGN028349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 26 Sep 2012 16:24:55 -0400 From: Luiz Capitulino Date: Wed, 26 Sep 2012 17:25:38 -0300 Message-Id: <1348691138-12879-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1348691138-12879-1-git-send-email-lcapitulino@redhat.com> References: <1348691138-12879-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 3/3] input: index_from_key(): drop unused code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: akong@redhat.com, eblake@redhat.com, avi@redhat.com, armbru@redhat.com The hex key conversion is unused since last commit. Signed-off-by: Luiz Capitulino --- 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