]> andersk Git - splint.git/blob - test/manual/list.c
Pushed back constraintResolve.c to the previous version.
[splint.git] / test / manual / list.c
1 typedef /*@null@*/ struct _list
2 {
3   /*@only@*/ char *this;
4   /*@null@*/ /*@only@*/ struct _list *next;
5 } *list;
6
7 extern /*@out@*/ /*@only@*/ void *
8   smalloc (size_t);
9
10 void
11 list_addh (list l, /*@only@*/ char *e)
12 {
13   if (l != NULL)
14     {
15       while (l->next != NULL) 
16         {
17           l = l->next;
18         }
19       
20       l->next = (list) smalloc (sizeof (*l->next));
21       l->next->this = e;
22     }
23 }
24
25   
26       
This page took 1.027509 seconds and 5 git commands to generate.