All of lore.kernel.org
 help / color / mirror / Atom feed
From: Programmingkid <programmingkidx@gmail.com>
To: Eric Blake <eblake@redhat.com>
Cc: BALATON Zoltan <balaton@eik.bme.hu>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Adding more function keys support
Date: Wed, 13 Dec 2017 21:23:35 -0500	[thread overview]
Message-ID: <D7DE9C77-75F6-4A26-AC06-C50B8BE1F7D0@gmail.com> (raw)
In-Reply-To: <9dae1cb6-0ed1-ca51-42c7-e8d0bddf10d3@redhat.com>


> On Dec 13, 2017, at 9:20 PM, Eric Blake <eblake@redhat.com> 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	other threads:[~2017-12-14  2:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-10  7:10 [Qemu-devel] Adding more function keys support Programmingkid
2017-12-12 14:34 ` Daniel P. Berrange
2017-12-12 17:49   ` Programmingkid
2017-12-13  9:14     ` Daniel P. Berrange
2017-12-13 16:03       ` Programmingkid
2017-12-13 18:22         ` BALATON Zoltan
2017-12-13 19:18           ` Programmingkid
2017-12-14  2:20             ` Eric Blake
2017-12-14  2:23               ` Programmingkid [this message]
2017-12-14 10:27             ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D7DE9C77-75F6-4A26-AC06-C50B8BE1F7D0@gmail.com \
    --to=programmingkidx@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.