Don't try calling lsl when file is missing.
[splint-patched.git] / test / specclauses4.c
blob788291777fdc5cabb847dab9e7ab54ee5f94fe3d
1 /*@-paramuse@*/
3 typedef struct
5 int id;
6 char *name;
7 } *record;
9 void usename (/*@special@*/ char **name)
10 /*@uses *name@*/
11 /*@pre:isnull *name@*/
13 **name = 'a'; /* 1. Dereference of null pointer *name: **name */
16 void callname (void)
18 char **s;
20 s = (char **) malloc (sizeof (char *));
21 assert (s != NULL);
22 *s = (char *) malloc (sizeof (char));
23 assert (*s != NULL);
25 **s = 'a';
27 usename (s); /* 2. Non-null storage *s corresponds to storage listed in ... */
28 free (*s);
29 free (s);
32 void nullname (/*@special@*/ char **name)
33 /*@post:isnull *name@*/
35 *name = NULL;
38 void nullname2 (/*@special@*/ char **name)
39 /*@post:isnull *name@*/
42 } /* 3. Non-null storage *name corresponds to storage listed in ... */