summaryrefslogtreecommitdiff
path: root/test/malloc/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/malloc/malloc.c')
-rw-r--r--test/malloc/malloc.c4
1 files changed, 4 insertions, 0 deletions
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);