News for hackers. Stuff that matters.
Re:Linus: bool is dangerous in C if you don't understand it by chrismcb on Sunday September 01, 2013 @02:22AM (#6309333)
Why not make the correct comparison and do BOOL b = pointer != NULL. Now the code says what you mean, is easy to understand, and assigns a boolean value to a bool.
Re:Linus: bool is dangerous in C if you don't understand it by to3m on Sunday September 01, 2013 @10:44AM (#6310553)
!!p does the same as p!=NULL. The choice is purely stylistic. (!p is equivalent to p==NULL; !!p is therefore equivalent to !(p==NULL). Or, alternatively, p!=NULL.)