Re: Kernel bugs found using inspect tool

From: H. Peter Anvin (hpa@transmeta.com)
Date: Wed Feb 23 2000 - 04:37:08 EST


Followup to: <Pine.LNX.4.04.10002222315070.12259-100000@beaker>
By author: Ricky Beam <jfbeam@bluetopia.net>
In newsgroup: linux.dev.kernel
>
> But it didn't complain about (a few lines above):
> aci_solo = !!*(int *) arg;
>

What's wrong with this one? !! in C is the standard way to
"booleanize" a value; "!!foo" means the same as "foo ? 1 : 0" except
for precedence, and obviously the former is much briefer.

The line thus means the same thing as:

    aci_solo = *(int *)arg ? 1 : 0;

    -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:32 EST