]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | # include "bool.h" |
2 | ||
3 | extern /*@truenull@*/ bool isnull(/*@null@*/ int *x); | |
4 | extern /*@falsenull@*/ bool notnull(/*@null@*/ int *x); | |
5 | extern /*@falsenull@*/ char badnull (/*@null@*/ int *x); | |
6 | extern /*@falsenull@*/ bool worsenull (/*@null@*/ int *x, int t); | |
7 | ||
8 | int g1 (/*@null@*/ int *y) | |
9 | { | |
10 | if (isnull (y)) | |
11 | { | |
12 | return 0; | |
13 | } | |
14 | ||
15 | return *y; | |
16 | } | |
17 | ||
18 | int g2 (/*@null@*/ int *y) | |
19 | { | |
20 | if (notnull (y)) | |
21 | { | |
22 | return 0; | |
23 | } | |
24 | else | |
25 | { | |
26 | return *y; | |
27 | } | |
28 | } | |
29 | ||
30 | int g3 (/*@null@*/ int *y) | |
31 | { | |
32 | if (notnull (y)) | |
33 | { | |
34 | return 0; | |
35 | } | |
36 | ||
37 | return *y; | |
38 | } |