diff options
Diffstat (limited to 'test/malloc/tst-mcheck.c')
-rw-r--r-- | test/malloc/tst-mcheck.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/malloc/tst-mcheck.c b/test/malloc/tst-mcheck.c index af72c042b..7476538d8 100644 --- a/test/malloc/tst-mcheck.c +++ b/test/malloc/tst-mcheck.c @@ -50,7 +50,11 @@ main (void) merror ("malloc (10) failed."); p = realloc (p, 0); +#ifdef __MALLOC_GLIBC_COMPAT__ + if (!p) +#else if (p != NULL) +#endif merror ("realloc (p, 0) failed."); p = malloc (0); @@ -62,7 +66,11 @@ main (void) merror ("malloc (0) failed."); p = realloc (p, 0); +#ifdef __MALLOC_GLIBC_COMPAT__ + if (!p) +#else if (p != NULL) +#endif merror ("realloc (p, 0) failed."); q = malloc (256); |