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:
3e6ccac
)
Do not set errno when they asked for size 0
author
Eric Andersen
<andersen@codepoet.org>
Thu, 16 Oct 2003 14:21:26 +0000
(14:21 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Thu, 16 Oct 2003 14:21:26 +0000
(14:21 -0000)
libc/stdlib/malloc-930716/malloc.c
patch
|
blob
|
history
diff --git
a/libc/stdlib/malloc-930716/malloc.c
b/libc/stdlib/malloc-930716/malloc.c
index
3e69f11
..
f24c248
100644
(file)
--- a/
libc/stdlib/malloc-930716/malloc.c
+++ b/
libc/stdlib/malloc-930716/malloc.c
@@
-167,7
+167,7
@@
void * __malloc_unlocked (size_t size)
#else
/* Some programs will call malloc (0). Lets be strict and return NULL */
if (unlikely(size == 0))
- goto oom;
+ return 0
#endif
/* Check if they are doing something dumb like malloc(-1) */
if (unlikely(((unsigned long)size > (unsigned long)(sizeof (struct list)*-2))))