From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkbdQ-00082B-8k for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:12:00 -0500 Received: from [199.232.76.173] (port=40946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkbdP-00081F-Ai for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:11:59 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkbdP-0007Fu-2o for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:11:59 -0500 Received: from mail-bw0-f218.google.com ([209.85.218.218]:46675) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NkbdO-0007Fo-91 for qemu-devel@nongnu.org; Thu, 25 Feb 2010 06:11:58 -0500 Received: by bwz10 with SMTP id 10so1035651bwz.2 for ; Thu, 25 Feb 2010 03:11:56 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4B865AFA.3020807@redhat.com> Date: Thu, 25 Feb 2010 12:11:54 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1267087161-15204-1-git-send-email-kraxel@redhat.com> <1267087161-15204-5-git-send-email-kraxel@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 4/4] kbd keds: vnc List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: Gerd Hoffmann , qemu-devel@nongnu.org On 02/25/2010 12:03 PM, Juan Quintela wrote: >> > + caps = ledstate & QEMU_CAPS_LOCK_LED ? 1 : 0; >> > + num = ledstate & QEMU_NUM_LOCK_LED ? 1 : 0; > I think it is clearer to use a bool. > > bool caps = ledstate& QEMU_CAPS_LOCK_LED; Are we assuming a C99 bool elsewhere? For example, I see only uses of bool like hw/eepro100.c: bool bit_el = ((command & 0x8000) != 0); So yet another choice is caps = (ledstate & QEMU_CAPS_LOCK_LED) != 0; Paolo