diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-24 20:22:12 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-24 20:22:12 +0200 |
commit | 7988979a722b4cdf287b2093956a76a3f19b9897 (patch) | |
tree | d35e251d0472ceca55a2eef61cff261c8ee68fab /test/malloc/realloc0.c |
add uClibc-ng test directory
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 0000000..62ae39d --- /dev/null +++ b/test/malloc/realloc0.c @@ -0,0 +1,13 @@ +#include <stdlib.h> +#include <stdio.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; +} |