|
From: | Paolo Bonzini |
Subject: | [Qemu-devel] Re: [PATCH 4/4] kbd keds: vnc |
Date: | Thu, 25 Feb 2010 12:11:54 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.1 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |