diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-04-25 16:07:47 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-04-25 16:07:47 +0000 |
commit | 3272f0e747a1b9c5305c206d47aab96f7ae5a9c3 (patch) | |
tree | 6358ddfce9dcb413c9300182dd8352ab191b3862 | |
parent | 7337e931e69a518f58aa7952f10d687f5abc7958 (diff) |
Be more strict with the glibc style malloc implementation. Return NULL
when folks do a malloc(0) using malloc-930716.
-rw-r--r-- | libc/stdlib/malloc-930716/malloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/stdlib/malloc-930716/malloc.c b/libc/stdlib/malloc-930716/malloc.c index e8f7c7004..88c9251ad 100644 --- a/libc/stdlib/malloc-930716/malloc.c +++ b/libc/stdlib/malloc-930716/malloc.c @@ -127,8 +127,8 @@ malloc (size_t size) if (!initialized && !initialize()) return NULL; - /* Some programs will call malloc (0). We let them pass. */ -#if 0 +#if 1 + /* Some programs will call malloc (0). Lets be strict and return NULL */ if (size == 0) return NULL; #endif |