svn commit: trunk/uClibc/test/malloc
vapier at uclibc.org
vapier at uclibc.org
Wed Feb 22 02:06:36 UTC 2006
Author: vapier
Date: 2006-02-21 18:06:35 -0800 (Tue, 21 Feb 2006)
New Revision: 14177
Log:
update malloc(0) check to handle expected behavior based upon config options
Modified:
trunk/uClibc/test/malloc/tst-mcheck.c
Changeset:
Modified: trunk/uClibc/test/malloc/tst-mcheck.c
===================================================================
--- trunk/uClibc/test/malloc/tst-mcheck.c 2006-02-22 02:04:31 UTC (rev 14176)
+++ trunk/uClibc/test/malloc/tst-mcheck.c 2006-02-22 02:06:35 UTC (rev 14177)
@@ -20,6 +20,7 @@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <features.h>
static int errors = 0;
@@ -53,7 +54,11 @@
merror ("realloc (p, 0) failed.");
p = malloc (0);
+#if !defined(__UCLIBC__) || defined(__MALLOC_GLIBC_COMPAT__)
if (p == NULL)
+#else
+ if (p != NULL)
+#endif
merror ("malloc (0) failed.");
p = realloc (p, 0);
More information about the uClibc-cvs
mailing list