[PATCH] Replace modulo operations in ringbuffer.c by masking operations.