File: ftest3.c

package info (click to toggle)
debauch 0.3-11
  • links: PTS
  • area: main
  • in suites: potato
  • size: 220 kB
  • ctags: 685
  • sloc: ansic: 2,136; makefile: 531; sh: 84; asm: 34
file content (15 lines) | stat: -rw-r--r-- 272 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>

/* this test should work with no problems */

main()
{
  char *a,*b;

  a=realloc(NULL,1000);  /* should be legal and === malloc(1000); */
  free(a);

  b=malloc(1000);
  b=realloc(b,0);      /* should be legal and === free(b) */
}