[HUST CSE] 判断条件冗余 (#7430)
This commit is contained in:
parent
e12c2f9306
commit
106f635552
|
@ -57,11 +57,8 @@ static void memheap_test(void)
|
|||
if (ptr[ptr_index])
|
||||
{
|
||||
if (operation == 0) /* free and malloc */
|
||||
{
|
||||
if (ptr[ptr_index])
|
||||
{
|
||||
rt_memheap_free(ptr[ptr_index]);
|
||||
}
|
||||
ptr[ptr_index] = rt_memheap_alloc(&heap1, slice_size);
|
||||
}
|
||||
else /* realloc */
|
||||
|
|
Loading…
Reference in New Issue