[uClibc-cvs] uClibc/libc/stdlib/malloc-930716 malloc.c,1.11,1.12
Erik Andersen
andersen at uclibc.org
Thu Oct 16 14:21:31 UTC 2003
Update of /var/cvs/uClibc/libc/stdlib/malloc-930716
In directory winder:/tmp/cvs-serv7598
Modified Files:
malloc.c
Log Message:
Do not set errno when they asked for size 0
Index: malloc.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdlib/malloc-930716/malloc.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- malloc.c 6 Sep 2003 11:49:28 -0000 1.11
+++ malloc.c 16 Oct 2003 14:21:26 -0000 1.12
@@ -167,7 +167,7 @@
#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))))
More information about the uClibc-cvs
mailing list