]> andersk Git - splint.git/blame - test/list.c
noexpand always false.
[splint.git] / test / list.c
CommitLineData
885824d3 1typedef /*@null@*/ struct _list
2{
3 /*@only@*/ char *this;
4 /*@null@*/ /*@only@*/ struct _list *next;
5} *list;
6
7extern /*@out@*/ /*@only@*/ void *
8 smalloc (size_t);
9
10void
11list_addh (/*@temp@*/ list l,
12 /*@only@*/ char *e)
13{
14 if (l != NULL)
15 {
16 while (l->next != NULL)
17 {
18 l = l->next;
19 }
20
21 l->next = (list)
22 smalloc (sizeof (*l->next));
23 l->next->this = e;
24 }
3120b462 25} /* l->next->next not defined */
885824d3 26
27void
28list_addh2 (/*@temp@*/ list l,
29 /*@only@*/ char *e)
30{
31 list new;
32
33 assert (l != NULL);
34 assert (l->next == NULL);
35
36 new = (list) smalloc (sizeof (*l->next));
37 new->this = e;
38 l->next = new;
3120b462 39} /* l->next->next not defined */
885824d3 40
41
This page took 0.096844 seconds and 5 git commands to generate.