qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Adding more function keys support


From: Programmingkid
Subject: Re: [Qemu-devel] Adding more function keys support
Date: Wed, 13 Dec 2017 21:23:35 -0500

> On Dec 13, 2017, at 9:20 PM, Eric Blake <address@hidden> wrote:
> 
> On 12/13/2017 01:18 PM, Programmingkid wrote:
> 
>> Thank you BALATON for the file. One thing that caught my eye in this file is 
>> this:
>> 
> 
>>      if (usage->code == KEY_FN) {
>>              asc->fn_on = !!value;
>> 
>> Why would they need the double !? 
> 
> Double '!!' is an idiomatic way to force a value to be converted to bool
> (squashing all non-zero values into 1).
> 
> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
> 

Thank you for the information.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]