提交 e5eac973 编写于 作者: B bernard.xiong

malloc(0) is implementation defined.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1155 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 b13215b7
......@@ -43,7 +43,9 @@ int libc_mem(void)
p = malloc(0);
if (p == NULL)
merror("malloc (0) failed.");
{
printf("malloc(0) returns NULL\n");
}
p = realloc(p, 0);
if (p != NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册