Util: Fix RingFIFOSize...
Vicki Pfau vi@endrift.com
Sun, 23 Sep 2018 20:32:58 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/util/ring-fifo.c
→
src/util/ring-fifo.c
@@ -26,7 +26,7 @@ size_t RingFIFOSize(const struct RingFIFO* buffer) {
const void* read; const void* write; ATOMIC_LOAD(read, buffer->readPtr); - ATOMIC_LOAD(write, buffer->readPtr); + ATOMIC_LOAD(write, buffer->writePtr); if (read <= write) { return (uintptr_t) write - (uintptr_t) read; } else {