提交 f27110de 编写于 作者: mysterywolf's avatar mysterywolf 提交者: guo

[utest] fix a bug

上级 ff4b6a66
......@@ -22,19 +22,19 @@
static void memheap_test(void)
{
struct rt_memheap heap1;
rt_ubase_t ptr_start;
void * ptr_start;
void *ptr[SLICE_NUM];
int i, cnt = 0;
/* init heap */
ptr_start = (rt_ubase_t)rt_malloc_align(HEAP_SIZE, HEAP_ALIGN);
ptr_start = rt_malloc_align(HEAP_SIZE, HEAP_ALIGN);
if (ptr_start == RT_NULL)
{
rt_kprintf("totle size too big,can not malloc memory!");
return;
}
rt_memheap_init(&heap1, HEAP_NAME, (void *)ptr_start, HEAP_SIZE);
rt_memheap_init(&heap1, HEAP_NAME, ptr_start, HEAP_SIZE);
/* test start */
for (i = 0; i < SLICE_NUM; i++)
......
......@@ -336,7 +336,7 @@ static void test_dynamic_mutex_create(void)
/* PRIO mode */
dynamic_mutex = rt_mutex_create("dynamic_mutex", RT_IPC_FLAG_PRIO);
if (RT_NULL == result)
if (RT_NULL == dynamic_mutex)
{
uassert_true(RT_FALSE);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册