home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lclint.zip / lclint-2_3h-os2-bin.zip / test / fields3.c < prev    next >
Text File  |  1997-09-03  |  382b  |  41 lines

  1. typedef struct 
  2. {
  3.   int *x;
  4.   int *y;
  5. } *pair;
  6.  
  7. void pair_free (/*@only@*/ pair p)
  8. {
  9.   int i = 3;
  10.  
  11.   free (p->x);
  12.  
  13.   if (i < 2)
  14.     {
  15.       *(p->y) = 3;
  16.       i++;
  17.     }
  18.  
  19.   free (p->y);
  20.   free (p);
  21. }
  22.  
  23. void pair_free2 (/*@only@*/ pair p)
  24. {
  25.   int i = 3;
  26.  
  27.   free (p->x);
  28.  
  29.   if (i < 2)
  30.     {
  31.       *(p->y) = 3;
  32.     }
  33.   else
  34.     {
  35.       *(p->y) = 12;
  36.     }
  37.  
  38.   free (p->y);
  39.   free (p);
  40. }
  41.