summaryrefslogtreecommitdiff
path: root/components/drivers/src/ringbuffer.c
diff options
context:
space:
mode:
authorLim-LinYuanbo <[email protected]>2021-10-27 11:14:33 +0800
committerGitHub <[email protected]>2021-10-27 11:14:33 +0800
commit078c3c5991e3024664fe7a51878874e02bf107dc (patch)
tree1dde9d1e6b32c07d5c803088f3ce6455a520cd04 /components/drivers/src/ringbuffer.c
parent48ffde55a2562d99c627e4f7e24a6a111c5b80e7 (diff)
parent31bf735d2159995358315036be1529523ac96d7d (diff)
Merge branch 'master' into master
Diffstat (limited to 'components/drivers/src/ringbuffer.c')
-rw-r--r--components/drivers/src/ringbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/drivers/src/ringbuffer.c b/components/drivers/src/ringbuffer.c
index 3e76b1774a..e33f533db0 100644
--- a/components/drivers/src/ringbuffer.c
+++ b/components/drivers/src/ringbuffer.c
@@ -244,7 +244,7 @@ rt_size_t rt_ringbuffer_peak(struct rt_ringbuffer *rb, rt_uint8_t **ptr)
*ptr = &rb->buffer_ptr[rb->read_index];
- if(rb->buffer_size - rb->read_index > size)
+ if((rt_size_t)(rb->buffer_size - rb->read_index) > size)
{
rb->read_index += size;
return size;