News for hackers. Stuff that matters.
Re:What is your favourite C programming trick? by JoachimSchipper on Saturday October 15, 2011 @08:34AM (#3114690)
Signed integer overflow is undefined, so make sure you're using an unsigned type in your ringbuffer example. (And an array with some-power-of-2 elements; you should probably use sizeof(array)/sizeof(<star> array) instead of ARRAY_SIZE too.)

There are no comments on this comment yet.