Hacker News new | past | comments | ask | show | jobs | submit login

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.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: