summaryrefslogtreecommitdiff
path: root/components/drivers/src/ringbuffer.c
diff options
context:
space:
mode:
authorHubretXie <[email protected]>2019-08-16 21:28:29 +0800
committerGitHub <[email protected]>2019-08-16 21:28:29 +0800
commit9662e18c3688681cd95ebd65242773dbe7c1366b (patch)
treeeb5b5326efc603b359d8758ee6cd17eebfb1fa75 /components/drivers/src/ringbuffer.c
parent56a65431dc830d6234a8a3286fea35664a65aeb1 (diff)
parent3b252d5b9721bb7cc649dad832507937efc1e96c (diff)
Merge pull request #7 from RT-Thread/master
sync
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);