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.

Attachment: pgpWnNk2OVRgd.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to