From mboxrd@z Thu Jan 1 00:00:00 1970 From: chris@basementcode.com (Christopher Harvey) Date: Mon, 01 Apr 2013 09:47:19 -0400 Subject: what does it use two "!!" In-Reply-To: <1364800386.40120.YahooMailClassic@web92107.mail.cnh.yahoo.com> References: <1364800386.40120.YahooMailClassic@web92107.mail.cnh.yahoo.com> Message-ID: <87y5d2cqhk.fsf@basementcode.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Ben Wu writes: > Dear All? > 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 > state = !!button->adc_state; if a = 1010011 then !a = 0 and !!a = 1 if a = 000000 then !a = 1 !! = 0 basically it means if a is non-zero then make a = exactly 1, else leave it at zero. > 2> is there some MSN group to study linux kernel or discuss it ? don't know, but it would be ironic. > Thanks and Best Regards > > Ben Wu > > MSN:crayben at yahoo.cn > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies at kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies