diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-10-16 14:21:26 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-10-16 14:21:26 +0000 |
commit | 1c010194a0b02ca2fdec15b4c7577873c250b391 (patch) | |
tree | 50cace5b905161147a42b3f032109a4cc04d0fac /libc/stdlib/malloc-930716 | |
parent | 3e6ccac195e61f572b0ac342d33ff9738e96a409 (diff) |
Do not set errno when they asked for size 0
Diffstat (limited to 'libc/stdlib/malloc-930716')
-rw-r--r-- | libc/stdlib/malloc-930716/malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdlib/malloc-930716/malloc.c b/libc/stdlib/malloc-930716/malloc.c index 3e69f1140..f24c24879 100644 --- 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)))) |