Some consistency changes to library & headers flags.
[splint-patched.git] / test / linked.c
blob89efaf44f847e83ba7cbaf78e40838c494464907
1 typedef struct _node *node;
3 struct _node {
4 int val;
5 /*@null@*/ node next;
8 void node_free1 (/*@only@*/ node n)
10 free (n); /* error: must free n->next */
13 void node_free2 (/*@only@*/ node n)
15 node nn = n->next;
16 free (n); /* okay */
17 } /* error: must free nn */
19 void node_free3 (/*@only@*/ node n)
21 node nn = n->next;
22 free (n); /* okay */
23 node_free1 (nn); /* possibly null error */
24 } /* okay */