diff options
| author | bernard.xiong <[email protected]> | 2010-11-30 06:58:06 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-11-30 06:58:06 +0000 |
| commit | e5eac973a87ec17a05d81e94229bca4997dfcc06 (patch) | |
| tree | 041c64748e3b47f23d3637c73905fc9ba08ccd4b /examples/libc/memory.c | |
| parent | b13215b7c77c4729418554cc4fc9e01c35ef2880 (diff) | |
malloc(0) is implementation defined.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1155 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'examples/libc/memory.c')
| -rw-r--r-- | examples/libc/memory.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/libc/memory.c b/examples/libc/memory.c index 0a0bfecd80..81b566f646 100644 --- a/examples/libc/memory.c +++ b/examples/libc/memory.c @@ -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)
|
