From 18811a88f74a8a0d2d54e275cd632b47817458a1 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Fri, 17 Mar 2006 02:43:51 +0000 Subject: Fix tests to work if MALLOC_GLIBC_COMPAT is enabled. --- test/malloc/malloc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/malloc/malloc.c') diff --git a/test/malloc/malloc.c b/test/malloc/malloc.c index d63856845..b35e329c0 100644 --- a/test/malloc/malloc.c +++ b/test/malloc/malloc.c @@ -70,7 +70,11 @@ int test2(void) ptr = malloc(100); ptr = realloc(ptr, 0); +#ifdef __MALLOC_GLIBC_COMPAT__ + if (!ptr) { +#else if (ptr) { +#endif printf("realloc(,0) failed\n"); ++ret; free(ptr); -- cgit v1.2.3