diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2016-12-20 20:51:59 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2016-12-20 20:51:59 +0100 |
commit | 013f366f501c928315cc2893f0f2348c8956d09e (patch) | |
tree | ca8638f4b96ef47e4b4bb7a5aaa59e86400f33bc /libc/stdlib/malloc/malloc.c | |
parent | 9ff01fc11a5d10108a10655b1751aa406aedae0a (diff) |
remove __MALLOC_GLIBC_COMPAT__ option
This option is enabled for a long time and I see no
useful case where we should be incompatible to glibc here.
Diffstat (limited to 'libc/stdlib/malloc/malloc.c')
-rw-r--r-- | libc/stdlib/malloc/malloc.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c index f6bf10a93..8d8ac7ffc 100644 --- a/libc/stdlib/malloc/malloc.c +++ b/libc/stdlib/malloc/malloc.c @@ -208,14 +208,8 @@ malloc (size_t size) __heap_check (__malloc_heap, "malloc"); #endif -#ifdef __MALLOC_GLIBC_COMPAT__ if (unlikely (size == 0)) size++; -#else - /* Some programs will call malloc (0). Lets be strict and return NULL */ - if (unlikely (size == 0)) - goto oom; -#endif /* Check if they are doing something dumb like malloc(-1) */ if (unlikely(((unsigned long)size > (unsigned long)(MALLOC_HEADER_SIZE*-2)))) |