From a3e9840d06d9cde5c91899ab85b7f7f383e3081f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 22 Feb 2006 02:06:35 +0000 Subject: update malloc(0) check to handle expected behavior based upon config options --- test/malloc/tst-mcheck.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test') diff --git a/test/malloc/tst-mcheck.c b/test/malloc/tst-mcheck.c index 16784912a..af72c042b 100644 --- a/test/malloc/tst-mcheck.c +++ b/test/malloc/tst-mcheck.c @@ -20,6 +20,7 @@ #include #include #include +#include static int errors = 0; @@ -53,7 +54,11 @@ main (void) 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); -- cgit v1.2.3