News for hackers. Stuff that matters.
Re:What is your favourite C programming trick? by mansr on Friday October 14, 2011 @11:01PM (#3113833)
That will only set as many bits as are in an int, which is wrong if the type of the variable you are setting is wider than int. For a long, you could of course use ~0ul, and so on for other types, but then you'd have to find and update every such assignment if the variable were ever changed to a wider type.

There are no comments on this comment yet.