diff options
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; +} + |