Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Dec 2008 08:22:29 +0100
From:      Ed Schouten <ed@80386.nl>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        Garrett Cooper <yanefbsd@gmail.com>, "current@freebsd.org" <current@freebsd.org>
Subject:   Re: RFC: small syscons and kbd patch
Message-ID:  <20081205072229.GE18652@hoeg.nl>
In-Reply-To: <bb4a86c70812040724w43ddec15yab72920d80d879d3@mail.gmail.com>
References:  <bb4a86c70812021701i621fdcfjb6a58a7f5cf781d5@mail.gmail.com> <7d6fde3d0812040324y3bf0901cy1f4a6d961362c314@mail.gmail.com> <bb4a86c70812040724w43ddec15yab72920d80d879d3@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--bi5JUZtvcfApsciF
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Maksim Yevmenkin <maksim.yevmenkin@gmail.com> wrote:
> the idea was to ensure that kbd->kb_locked variable only takes values
> 0 (zero) and 1 (one).

I often use constructs like these to do that:

	foo =3D bar ? 1 : 0;

Maybe !!bar is a lot shorter to write, I think the line above is a lot
easier to read.

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--bi5JUZtvcfApsciF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkk41rUACgkQ52SDGA2eCwU0XgCfTz6PnSH226WpjEt0xx8JeyZl
t6kAmwQHRIde8oeSuDQH2oLHTCpTqUGR
=exJ0
-----END PGP SIGNATURE-----

--bi5JUZtvcfApsciF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081205072229.GE18652>