summaryrefslogtreecommitdiff
path: root/test/malloc/realloc0.c
blob: afe9bb9bdce6dcec882b2efa8ece25534786119a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;
}