From patchwork Thu Sep 20 18:18:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 185441 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0F2BB2C0081 for ; Fri, 21 Sep 2012 04:18:12 +1000 (EST) Received: from localhost ([::1]:39850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TElKE-0007W2-0b for incoming@patchwork.ozlabs.org; Thu, 20 Sep 2012 14:18:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TElJR-0005GV-8W for qemu-devel@nongnu.org; Thu, 20 Sep 2012 14:17:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TElJQ-00050V-3b for qemu-devel@nongnu.org; Thu, 20 Sep 2012 14:17:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TElJP-00050E-Re for qemu-devel@nongnu.org; Thu, 20 Sep 2012 14:17:20 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8KIHJO6001476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 20 Sep 2012 14:17:19 -0400 Received: from localhost (ovpn-113-86.phx2.redhat.com [10.3.113.86]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q8KIHIXp029108; Thu, 20 Sep 2012 14:17:18 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Thu, 20 Sep 2012 15:18:01 -0300 Message-Id: <1348165081-28292-4-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1348165081-28292-1-git-send-email-lcapitulino@redhat.com> References: <1348165081-28292-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: akong@redhat.com, eblake@redhat.com, avi@redhat.com Subject: [Qemu-devel] [PATCH 3/3] input: index_from_key(): drop unused code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 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; }