]>
Commit | Line | Data |
---|---|---|
885824d3 | 1 | void test0(int value, int *data, int *result) |
2 | { | |
3 | int i; | |
4 | int j; | |
5 | ||
6 | *result = 0; | |
7 | switch(value) | |
8 | { | |
9 | case 1: | |
10 | for(i=1;i<100;i++) | |
11 | { | |
12 | for(j=0;j<100;j++) | |
13 | { | |
14 | if(data[j] == i) | |
15 | goto RETURN; | |
16 | } | |
17 | } | |
18 | *result = 1; | |
19 | break; | |
20 | case 3: | |
21 | for(i=1;i<100;i++) | |
22 | { | |
23 | for(j=0;j<100;j++) | |
24 | { | |
25 | if(data[j] == 2*i+1) | |
26 | goto RETURN; | |
27 | } | |
28 | } | |
29 | *result = 2; | |
30 | break; | |
31 | default: | |
32 | *result = -1; | |
33 | break; | |
34 | } | |
35 | RETURN: | |
36 | /* *result = 0; // if this line is not here, lclint fails */ | |
37 | } |