OSDN Git Service
(root)
/
uclinux-h8
/
uclibc-ng.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6a3377
)
update malloc(0) check to handle expected behavior based upon config options
author
Mike Frysinger
<vapier@gentoo.org>
Wed, 22 Feb 2006 02:06:35 +0000
(
02:06
-0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Wed, 22 Feb 2006 02:06:35 +0000
(
02:06
-0000)
test/malloc/tst-mcheck.c
patch
|
blob
|
history
diff --git
a/test/malloc/tst-mcheck.c
b/test/malloc/tst-mcheck.c
index
1678491
..
af72c04
100644
(file)
--- a/
test/malloc/tst-mcheck.c
+++ b/
test/malloc/tst-mcheck.c
@@
-20,6
+20,7
@@
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
+#include <features.h>
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);