]> andersk Git - splint.git/blame_incremental - test/list.c
Fixed manual csvoverwrite.
[splint.git] / test / list.c
... / ...
CommitLineData
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 }
25} /* l->next->next not defined */
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;
39} /* l->next->next not defined */
40
41
This page took 0.1026 seconds and 5 git commands to generate.