OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f934cd0
)
add support for __MALLOC_GLIBC_COMPAT__ (malloc(0) == NULL) so the malloc test wont...
author
Mike Frysinger
<vapier@gentoo.org>
Wed, 6 Jul 2005 01:23:08 +0000
(
01:23
-0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Wed, 6 Jul 2005 01:23:08 +0000
(
01:23
-0000)
libc/stdlib/malloc-standard/malloc.c
patch
|
blob
|
history
diff --git
a/libc/stdlib/malloc-standard/malloc.c
b/libc/stdlib/malloc-standard/malloc.c
index
51e02a2
..
7025e83
100644
(file)
--- a/
libc/stdlib/malloc-standard/malloc.c
+++ b/
libc/stdlib/malloc-standard/malloc.c
@@
-827,6
+827,10
@@
void* malloc(size_t bytes)
mchunkptr bck; /* misc temp for linking */
void * sysmem;
+#if !defined(__MALLOC_GLIBC_COMPAT__)
+ if (!bytes) return NULL;
+#endif
+
LOCK;
av = get_malloc_state();
/*