diff options
| author | guo <[email protected]> | 2021-10-14 13:35:50 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-10-14 13:35:50 +0800 |
| commit | 1f28bd89f88e0b81302c64d8969f6b4374c2f147 (patch) | |
| tree | adb7d45ad2e29384e0c82cf45ae609f290ed5158 /components/drivers | |
| parent | a987cfe0e62c122a34998d89258e1b0d3e843d9e (diff) | |
| parent | 396b7da6fd35828d97ada728947f81b6cad478e5 (diff) | |
Merge pull request #5174 from mysterywolf/timewarning
[libc][time] Ensure the data types are consistent
Diffstat (limited to 'components/drivers')
| -rw-r--r-- | components/drivers/src/ringbuffer.c | 2 |
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; |
