summaryrefslogtreecommitdiff
path: root/lib/ringbuf.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-03-13 12:08:38 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-03-13 12:08:38 -0400
commit1f35b46a2f35d59b86ed3ee557aa1c9fcf2fcac9 (patch)
tree27de606b3510b126766ac7a0ac9eb8ddf4573ab0 /lib/ringbuf.c
parentd47ae3db4cf14c72d8468d61113ac88e19235791 (diff)
parentc1a003878246ccc84ab5986558ca959f4545f738 (diff)
Merge branch 'master' into docuser
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/ringbuf.c')
-rw-r--r--lib/ringbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ringbuf.c b/lib/ringbuf.c
index 11db502a94..1c3c3e9753 100644
--- a/lib/ringbuf.c
+++ b/lib/ringbuf.c
@@ -96,7 +96,7 @@ size_t ringbuf_peek(struct ringbuf *buf, size_t offset, void *data, size_t size)
size_t remain = ringbuf_remain(buf);
if (offset >= remain)
return 0;
- size_t copysize = MAX(MIN(remain - offset, size), (size_t) 0);
+ size_t copysize = MAX(MIN(remain - offset, size), (size_t)0);
size_t tocopy = copysize;
size_t cstart = (buf->start + offset) % buf->size;
if (tocopy >= buf->size - cstart) {