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