Avoid void* arithmetic in ringbuffer