fix malloc(0xffffffff) issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1154 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
7880b57f3c
commit
b13215b7c7
|
@ -233,7 +233,7 @@ void *rt_page_alloc(rt_size_t npages)
|
||||||
struct rt_page_head *b, *n;
|
struct rt_page_head *b, *n;
|
||||||
struct rt_page_head **prev;
|
struct rt_page_head **prev;
|
||||||
|
|
||||||
RT_ASSERT(npages != 0);
|
if(npages == 0) return RT_NULL;
|
||||||
|
|
||||||
for (prev = &rt_page_list; (b = *prev) != RT_NULL; prev = &(b->next))
|
for (prev = &rt_page_list; (b = *prev) != RT_NULL; prev = &(b->next))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue