Fix: handle writes of length 0
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 30 Jun 2013 21:45:32 +0000 (17:45 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 30 Jun 2013 21:49:26 +0000 (17:49 -0400)
commit3ff6e388aad7e21dbbd556cbe1d53f1d6714534e
tree331cecb7e38535e25feba0f539684c9b2f84d90b
parenta3c3a9f70abbfba9aa524f44b2f1f52faf574402
Fix: handle writes of length 0

lib_ring_buffer_write() could be passed a length of 0. This typically
has no side-effect as far as writing into the buffers is concerned,
except for one detail: in overwrite mode, there is a check to make sure
the sub-buffer can be written into. This check is performed even if
length is 0. In the case where this would fall exactly at the end of a
sub-buffer, the check would fail, because the offset would fall exactly
at the beginning of the next sub-buffer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/backend.h
libringbuffer/ring_buffer_backend.c
This page took 0.025078 seconds and 4 git commands to generate.