diff --git a/include/ck_ring.h b/include/ck_ring.h index 33d1ad1..9f6754e 100644 --- a/include/ck_ring.h +++ b/include/ck_ring.h @@ -110,7 +110,7 @@ ck_ring_valid(const struct ck_ring *ring) return false; /* The producer may only be up to size slots ahead of consumer. */ - if (p_head - c_head > size) + if (p_head - c_head >= size) return false; return true;