From: Eric Blake <eblake@redhat.com>
To: Programmingkid <programmingkidx@gmail.com>,
BALATON Zoltan <balaton@eik.bme.hu>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Adding more function keys support
Date: Wed, 13 Dec 2017 20:20:43 -0600 [thread overview]
Message-ID: <9dae1cb6-0ed1-ca51-42c7-e8d0bddf10d3@redhat.com> (raw)
In-Reply-To: <99BD2069-929C-402A-B38A-778DAB427449@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 492 bytes --]
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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-12-14 2:20 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 [this message]
2017-12-14 2:23 ` Programmingkid
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=9dae1cb6-0ed1-ca51-42c7-e8d0bddf10d3@redhat.com \
--to=eblake@redhat.com \
--cc=balaton@eik.bme.hu \
--cc=programmingkidx@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).