what does it use two "!!"
Valdis.Kletnieks at vt.edu
Valdis.Kletnieks at vt.edu
Mon Apr 1 05:37:30 EDT 2013
On Mon, 01 Apr 2013 15:10:46 +0800, Ben Wu said:
> 1> I found some placeuse two "!!", what's means
> if(button->gpio != INVALID_GPIO)
> state = !!((gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low);
> else
Gaah. That line of code fell out of the ugly tree and hit every branch
on the way down.
Use of "!!" *and* "? 1 :0 " in the same line of code to do the same thing.
Ouch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 865 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20130401/36cad557/attachment.bin
More information about the Kernelnewbies
mailing list