News for hackers. Stuff that matters.
Re:Worst Bug Ever by to3m on Monday January 21, 2013 @04:43PM (#5093905)
flag&FLAG_VALUE will be FLAG_VALUE or 0, so unless FLAG_VALUE==TRUE the answer could be wrong.

Suggest (flag&FLAG_VALUE), or, if you need the expression to be of type bool, ((flag&FLAG_VALUE)!=0) or (!!(flag&FLAG_VALUE)).

Re:Worst Bug Ever by mpyne on Monday January 21, 2013 @09:24PM (#5095151)
Very true, I just checked to see if I can edit but I can't, so mea culpa.