Re: double exclamation (!!) suckage in the kernel



On 5/26/07, Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> wrote:
On Sat, May 26, 2007 at 01:53:59AM +0530, Satyam Sharma wrote:
> Are all these occurrences merely the debris of
> s/something/!notsomething/g kind of patches or is there some
> dark, unknown C / gcc wizardry I have absolutely no clue of?

Try building and running this:

#include <stdio.h>
int main()
{
int i;
for (i = 0; i < 10; i++)
printf("%d: %d\n", i, !!i);
return 0;
}

and you should see it's effect.

Ah, yes, of course I see now!

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



Relevant Pages

  • Re: Where claus with "NOT IN" doesnt work
    ... > CREATE TABLE #a (a INT) ... then value NOT IN subquery has problems. ... the subquery is NULL, so value IN subquery does not return TRUE or FALSE, it returns UNKNOWN and NOT of UNKNOWN is still UNKNOWN, so the WHERE clause ...
    (microsoft.public.sqlserver.programming)
  • Re: SystemParametersInfo not working?
    ... device it's possible that "unknown" is what the APIs are returning. ... > I'm trying to use the function SystemParametersInfo to get some info about ... > internal static extern int SystemParametersInfo ( ... > public static Platform GetPlatform() ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: Drag & Drop DataFlavor troubles
    ... i have no clue. ... Wath happpens if you place these line int the try blok insteat of after? ...
    (comp.lang.java.help)
  • Re: recent -git: BUG in free_thread_xstate
    ... extern size_t strlen(const char *s); ... int d0, d1, d2; ... I have found an important clue; it seems to be my network driver's fault: ...
    (Linux-Kernel)

Loading