summaryrefslogtreecommitdiff
path: root/components/drivers/src/ringbuffer.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2019-12-21 06:40:47 +0800
committerGitHub <[email protected]>2019-12-21 06:40:47 +0800
commit0c11cd86717295bc4c41d7421e4119a62bbbfa11 (patch)
tree594994078d07de40ba37c47d5d5c536a51bfe0fc /components/drivers/src/ringbuffer.c
parent3491b2f0f470d3834763b9d78071ce7804597c94 (diff)
parenta383385a3c0a676cee4471fd3cb4f372a36e1023 (diff)
Merge pull request #3274 from armink/lts-v3.1.x
Lts v3.1.x
Diffstat (limited to 'components/drivers/src/ringbuffer.c')
-rw-r--r--components/drivers/src/ringbuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/drivers/src/ringbuffer.c b/components/drivers/src/ringbuffer.c
index 0acdbbd38c..c6a491a7cc 100644
--- a/components/drivers/src/ringbuffer.c
+++ b/components/drivers/src/ringbuffer.c
@@ -332,11 +332,11 @@ struct rt_ringbuffer* rt_ringbuffer_create(rt_uint16_t size)
size = RT_ALIGN_DOWN(size, RT_ALIGN_SIZE);
- rb = rt_malloc(sizeof(struct rt_ringbuffer));
+ rb = (struct rt_ringbuffer *)rt_malloc(sizeof(struct rt_ringbuffer));
if (rb == RT_NULL)
goto exit;
- pool = rt_malloc(size);
+ pool = (rt_uint8_t *)rt_malloc(size);
if (pool == RT_NULL)
{
rt_free(rb);