diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-31 12:43:21 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-31 12:43:21 +0000 |
commit | 3ba5ff222689392d99f747c961196ea06757a1f6 (patch) | |
tree | 3c29c774598886ae40bf6ccff658fea3a82a5e02 /test/malloc/realloc0.c | |
parent | 41dfe61361c9cd15d4021d1bb2542a44929ff081 (diff) |
Add a simple realloc test
-Erik
Diffstat (limited to 'test/malloc/realloc0.c')
-rw-r--r-- | test/malloc/realloc0.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/malloc/realloc0.c b/test/malloc/realloc0.c new file mode 100644 index 000000000..afe9bb9bd --- /dev/null +++ b/test/malloc/realloc0.c @@ -0,0 +1,13 @@ +#include <stdlib.h> + +int main(int argc, char **argv) +{ + void *ptr = NULL; + ptr = realloc(ptr, 0); + printf("realloc(NULL, 0) -- pointer = %p\n", ptr); + + ptr = malloc(0); + printf("malloc(0) -- pointer = %p\n", ptr); + return 0; +} + |