Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/conf/conf_api.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | static void value_free_hash_doall_arg(CONF_VALUE *a, | - | ||||||||||||||||||
3 | struct lhash_st_CONF_VALUE *conf); | - | ||||||||||||||||||
4 | static void value_free_stack_doall(CONF_VALUE *a); | - | ||||||||||||||||||
5 | static void value_free_hash_LHASH_DOALL_ARG(void *arg1, void *arg2) { CONF_VALUE *a = arg1; struct lhash_st_CONF_VALUE *b = arg2; value_free_hash_doall_arg(a, b); } executed 30 times by 1 test: end of block Executed by:
| 30 | ||||||||||||||||||
6 | - | |||||||||||||||||||
7 | static void value_free_stack_LHASH_DOALL(void *arg) { CONF_VALUE *a = arg; value_free_stack_doall(a); } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||
8 | - | |||||||||||||||||||
9 | - | |||||||||||||||||||
10 | CONF_VALUE * | - | ||||||||||||||||||
11 | _CONF_get_section(const CONF *conf, const char *section) | - | ||||||||||||||||||
12 | { | - | ||||||||||||||||||
13 | CONF_VALUE *v, vv; | - | ||||||||||||||||||
14 | - | |||||||||||||||||||
15 | if ((
| 0-6 | ||||||||||||||||||
16 | ((void *)0)
| 0-6 | ||||||||||||||||||
17 | )
| 0-6 | ||||||||||||||||||
18 | ((void *)0)
| 0-6 | ||||||||||||||||||
19 | )
| 0-6 | ||||||||||||||||||
20 | return never executed: (return ( ((void *)0) ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
21 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
22 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
23 | vv.name = | - | ||||||||||||||||||
24 | ((void *)0) | - | ||||||||||||||||||
25 | ; | - | ||||||||||||||||||
26 | vv.section = (char *)section; | - | ||||||||||||||||||
27 | v = ((CONF_VALUE *)lh_retrieve(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? &vv : (CONF_VALUE*)0)))); | - | ||||||||||||||||||
28 | return executed 6 times by 1 test: (v);return (v); Executed by:
executed 6 times by 1 test: return (v); Executed by:
| 6 | ||||||||||||||||||
29 | } | - | ||||||||||||||||||
30 | - | |||||||||||||||||||
31 | - | |||||||||||||||||||
32 | struct stack_st_CONF_VALUE * | - | ||||||||||||||||||
33 | _CONF_get_section_values(const CONF *conf, const char *section) | - | ||||||||||||||||||
34 | { | - | ||||||||||||||||||
35 | CONF_VALUE *v; | - | ||||||||||||||||||
36 | - | |||||||||||||||||||
37 | v = _CONF_get_section(conf, section); | - | ||||||||||||||||||
38 | if (v !=
| 0-2 | ||||||||||||||||||
39 | ((void *)0)
| 0-2 | ||||||||||||||||||
40 | ) | - | ||||||||||||||||||
41 | return executed 2 times by 1 test: ((struct stack_st_CONF_VALUE *)v->value);return ((struct stack_st_CONF_VALUE *)v->value); Executed by:
executed 2 times by 1 test: return ((struct stack_st_CONF_VALUE *)v->value); Executed by:
| 2 | ||||||||||||||||||
42 | else | - | ||||||||||||||||||
43 | return never executed: (return ( ((void *)0) ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
44 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
45 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
46 | } | - | ||||||||||||||||||
47 | - | |||||||||||||||||||
48 | int | - | ||||||||||||||||||
49 | _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value) | - | ||||||||||||||||||
50 | { | - | ||||||||||||||||||
51 | CONF_VALUE *v = | - | ||||||||||||||||||
52 | ((void *)0) | - | ||||||||||||||||||
53 | ; | - | ||||||||||||||||||
54 | struct stack_st_CONF_VALUE *ts; | - | ||||||||||||||||||
55 | - | |||||||||||||||||||
56 | ts = (struct stack_st_CONF_VALUE *)section->value; | - | ||||||||||||||||||
57 | - | |||||||||||||||||||
58 | value->section = section->section; | - | ||||||||||||||||||
59 | if (!sk_push(((_STACK*) (1 ? (ts) : (struct stack_st_CONF_VALUE*)0)), ((void*) (1 ? (value) : (CONF_VALUE*)0)))
| 0-24 | ||||||||||||||||||
60 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
61 | } | - | ||||||||||||||||||
62 | - | |||||||||||||||||||
63 | v = ((CONF_VALUE *)lh_insert(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? value : (CONF_VALUE*)0)))); | - | ||||||||||||||||||
64 | if (v !=
| 0-24 | ||||||||||||||||||
65 | ((void *)0)
| 0-24 | ||||||||||||||||||
66 | ) { | - | ||||||||||||||||||
67 | (void)(CONF_VALUE *)sk_delete_ptr(((_STACK*) (1 ? (ts) : (struct stack_st_CONF_VALUE*)0)), ((void*) (1 ? (v) : (CONF_VALUE*)0))); | - | ||||||||||||||||||
68 | free(v->name); | - | ||||||||||||||||||
69 | free(v->value); | - | ||||||||||||||||||
70 | free(v); | - | ||||||||||||||||||
71 | } never executed: end of block | 0 | ||||||||||||||||||
72 | return executed 24 times by 1 test: 1;return 1; Executed by:
executed 24 times by 1 test: return 1; Executed by:
| 24 | ||||||||||||||||||
73 | } | - | ||||||||||||||||||
74 | - | |||||||||||||||||||
75 | char * | - | ||||||||||||||||||
76 | _CONF_get_string(const CONF *conf, const char *section, const char *name) | - | ||||||||||||||||||
77 | { | - | ||||||||||||||||||
78 | CONF_VALUE *v, vv; | - | ||||||||||||||||||
79 | - | |||||||||||||||||||
80 | if (name ==
| 0-58 | ||||||||||||||||||
81 | ((void *)0)
| 0-58 | ||||||||||||||||||
82 | ) | - | ||||||||||||||||||
83 | return never executed: (return ( ((void *)0) ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
84 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
85 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
86 | if (conf !=
| 0-58 | ||||||||||||||||||
87 | ((void *)0)
| 0-58 | ||||||||||||||||||
88 | ) { | - | ||||||||||||||||||
89 | if (section !=
| 4-54 | ||||||||||||||||||
90 | ((void *)0)
| 4-54 | ||||||||||||||||||
91 | ) { | - | ||||||||||||||||||
92 | vv.name = (char *)name; | - | ||||||||||||||||||
93 | vv.section = (char *)section; | - | ||||||||||||||||||
94 | v = ((CONF_VALUE *)lh_retrieve(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? &vv : (CONF_VALUE*)0)))); | - | ||||||||||||||||||
95 | if (v !=
| 13-41 | ||||||||||||||||||
96 | ((void *)0)
| 13-41 | ||||||||||||||||||
97 | ) | - | ||||||||||||||||||
98 | return executed 13 times by 1 test: (v->value);return (v->value); Executed by:
executed 13 times by 1 test: return (v->value); Executed by:
| 13 | ||||||||||||||||||
99 | } executed 41 times by 1 test: end of block Executed by:
| 41 | ||||||||||||||||||
100 | vv.section = "default"; | - | ||||||||||||||||||
101 | vv.name = (char *)name; | - | ||||||||||||||||||
102 | v = ((CONF_VALUE *)lh_retrieve(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? &vv : (CONF_VALUE*)0)))); | - | ||||||||||||||||||
103 | if (v !=
| 0-45 | ||||||||||||||||||
104 | ((void *)0)
| 0-45 | ||||||||||||||||||
105 | ) | - | ||||||||||||||||||
106 | return never executed: (v->value);return (v->value); never executed: return (v->value); | 0 | ||||||||||||||||||
107 | else | - | ||||||||||||||||||
108 | return executed 45 times by 1 test: (return ( ((void *)0) ); Executed by:
executed 45 times by 1 test: return ( ((void *)0) ); Executed by:
| 45 | ||||||||||||||||||
109 | ((void *)0) executed 45 times by 1 test: return ( ((void *)0) ); Executed by:
| 45 | ||||||||||||||||||
110 | ); executed 45 times by 1 test: return ( ((void *)0) ); Executed by:
| 45 | ||||||||||||||||||
111 | } else | - | ||||||||||||||||||
112 | return never executed: (return ( ((void *)0) ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
113 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
114 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||
115 | } | - | ||||||||||||||||||
116 | - | |||||||||||||||||||
117 | static unsigned long | - | ||||||||||||||||||
118 | conf_value_hash(const CONF_VALUE *v) | - | ||||||||||||||||||
119 | { | - | ||||||||||||||||||
120 | return executed 159 times by 1 test: (lh_strhash(v->section) << 2) ^ lh_strhash(v->name);return (lh_strhash(v->section) << 2) ^ lh_strhash(v->name); Executed by:
executed 159 times by 1 test: return (lh_strhash(v->section) << 2) ^ lh_strhash(v->name); Executed by:
| 159 | ||||||||||||||||||
121 | } | - | ||||||||||||||||||
122 | - | |||||||||||||||||||
123 | static unsigned long conf_value_LHASH_HASH(const void *arg) { const CONF_VALUE *a = arg; return executed 159 times by 1 test: conf_value_hash(a);return conf_value_hash(a); Executed by:
executed 159 times by 1 test: }return conf_value_hash(a); Executed by:
| 159 | ||||||||||||||||||
124 | - | |||||||||||||||||||
125 | static int | - | ||||||||||||||||||
126 | conf_value_cmp(const CONF_VALUE *a, const CONF_VALUE *b) | - | ||||||||||||||||||
127 | { | - | ||||||||||||||||||
128 | int i; | - | ||||||||||||||||||
129 | - | |||||||||||||||||||
130 | if (a->section != b->section
| 15-24 | ||||||||||||||||||
131 | i = | - | ||||||||||||||||||
132 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( | - | ||||||||||||||||||
133 | a->section | - | ||||||||||||||||||
134 | ) && __builtin_constant_p ( | - | ||||||||||||||||||
135 | b->section | - | ||||||||||||||||||
136 | ) && (__s1_len = __builtin_strlen ( | - | ||||||||||||||||||
137 | a->section | - | ||||||||||||||||||
138 | ), __s2_len = __builtin_strlen ( | - | ||||||||||||||||||
139 | b->section | - | ||||||||||||||||||
140 | ), (!((size_t)(const void *)(( | - | ||||||||||||||||||
141 | a->section | - | ||||||||||||||||||
142 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
143 | a->section | - | ||||||||||||||||||
144 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(( | - | ||||||||||||||||||
145 | b->section | - | ||||||||||||||||||
146 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
147 | b->section | - | ||||||||||||||||||
148 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp ( | - | ||||||||||||||||||
149 | a->section | - | ||||||||||||||||||
150 | , | - | ||||||||||||||||||
151 | b->section | - | ||||||||||||||||||
152 | ) : (__builtin_constant_p ( | - | ||||||||||||||||||
153 | a->section | - | ||||||||||||||||||
154 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
155 | a->section | - | ||||||||||||||||||
156 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
157 | a->section | - | ||||||||||||||||||
158 | ) == 1) && (__s1_len = __builtin_strlen ( | - | ||||||||||||||||||
159 | a->section | - | ||||||||||||||||||
160 | ), __s1_len < 4) ? (__builtin_constant_p ( | - | ||||||||||||||||||
161 | b->section | - | ||||||||||||||||||
162 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
163 | b->section | - | ||||||||||||||||||
164 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
165 | b->section | - | ||||||||||||||||||
166 | ) == 1) ? __builtin_strcmp ( | - | ||||||||||||||||||
167 | a->section | - | ||||||||||||||||||
168 | , | - | ||||||||||||||||||
169 | b->section | - | ||||||||||||||||||
170 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - | ||||||||||||||||||
171 | b->section | - | ||||||||||||||||||
172 | ); int __result = (((const unsigned char *) (const char *) ( | - | ||||||||||||||||||
173 | a->section | - | ||||||||||||||||||
174 | ))[0] - __s2[0]); if (__s1_len > 0
| 0 | ||||||||||||||||||
175 | a->section | - | ||||||||||||||||||
176 | ))[1] - __s2[1]); if (__s1_len > 1
| 0 | ||||||||||||||||||
177 | a->section | - | ||||||||||||||||||
178 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( a->section ))[3] - __s2[3]); | 0 | ||||||||||||||||||
179 | a->section never executed: __result = (((const unsigned char *) (const char *) ( a->section ))[3] - __s2[3]); | 0 | ||||||||||||||||||
180 | ))[3] - __s2[3]); never executed: }__result = (((const unsigned char *) (const char *) ( a->section ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : (__builtin_constant_p (end of block | 0 | ||||||||||||||||||
181 | b->section | - | ||||||||||||||||||
182 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
183 | b->section | - | ||||||||||||||||||
184 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
185 | b->section | - | ||||||||||||||||||
186 | ) == 1) && (__s2_len = __builtin_strlen ( | - | ||||||||||||||||||
187 | b->section | - | ||||||||||||||||||
188 | ), __s2_len < 4) ? (__builtin_constant_p ( | - | ||||||||||||||||||
189 | a->section | - | ||||||||||||||||||
190 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
191 | a->section | - | ||||||||||||||||||
192 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
193 | a->section | - | ||||||||||||||||||
194 | ) == 1) ? __builtin_strcmp ( | - | ||||||||||||||||||
195 | a->section | - | ||||||||||||||||||
196 | , | - | ||||||||||||||||||
197 | b->section | - | ||||||||||||||||||
198 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - | ||||||||||||||||||
199 | a->section | - | ||||||||||||||||||
200 | ); int __result = (((const unsigned char *) (const char *) ( | - | ||||||||||||||||||
201 | b->section | - | ||||||||||||||||||
202 | ))[0] - __s2[0]); if (__s2_len > 0
| 0 | ||||||||||||||||||
203 | b->section | - | ||||||||||||||||||
204 | ))[1] - __s2[1]); if (__s2_len > 1
| 0 | ||||||||||||||||||
205 | b->section | - | ||||||||||||||||||
206 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( b->section ))[3] - __s2[3]); | 0 | ||||||||||||||||||
207 | b->section never executed: __result = (((const unsigned char *) (const char *) ( b->section ))[3] - __s2[3]); | 0 | ||||||||||||||||||
208 | ))[3] - __s2[3]); never executed: }__result = (((const unsigned char *) (const char *) ( b->section ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : __builtin_strcmp (end of block | 0 | ||||||||||||||||||
209 | a->section | - | ||||||||||||||||||
210 | , | - | ||||||||||||||||||
211 | b->section | - | ||||||||||||||||||
212 | )))); }) | - | ||||||||||||||||||
213 | ; | - | ||||||||||||||||||
214 | if (i
| 0-15 | ||||||||||||||||||
215 | return never executed: (i);return (i); never executed: return (i); | 0 | ||||||||||||||||||
216 | } executed 15 times by 1 test: end of block Executed by:
| 15 | ||||||||||||||||||
217 | if ((
| 2-37 | ||||||||||||||||||
218 | ((void *)0)
| 2-37 | ||||||||||||||||||
219 | )
| 0-37 | ||||||||||||||||||
220 | ((void *)0)
| 0-37 | ||||||||||||||||||
221 | )
| 0-37 | ||||||||||||||||||
222 | i = | - | ||||||||||||||||||
223 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p ( | - | ||||||||||||||||||
224 | a->name | - | ||||||||||||||||||
225 | ) && __builtin_constant_p ( | - | ||||||||||||||||||
226 | b->name | - | ||||||||||||||||||
227 | ) && (__s1_len = __builtin_strlen ( | - | ||||||||||||||||||
228 | a->name | - | ||||||||||||||||||
229 | ), __s2_len = __builtin_strlen ( | - | ||||||||||||||||||
230 | b->name | - | ||||||||||||||||||
231 | ), (!((size_t)(const void *)(( | - | ||||||||||||||||||
232 | a->name | - | ||||||||||||||||||
233 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
234 | a->name | - | ||||||||||||||||||
235 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(( | - | ||||||||||||||||||
236 | b->name | - | ||||||||||||||||||
237 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
238 | b->name | - | ||||||||||||||||||
239 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp ( | - | ||||||||||||||||||
240 | a->name | - | ||||||||||||||||||
241 | , | - | ||||||||||||||||||
242 | b->name | - | ||||||||||||||||||
243 | ) : (__builtin_constant_p ( | - | ||||||||||||||||||
244 | a->name | - | ||||||||||||||||||
245 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
246 | a->name | - | ||||||||||||||||||
247 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
248 | a->name | - | ||||||||||||||||||
249 | ) == 1) && (__s1_len = __builtin_strlen ( | - | ||||||||||||||||||
250 | a->name | - | ||||||||||||||||||
251 | ), __s1_len < 4) ? (__builtin_constant_p ( | - | ||||||||||||||||||
252 | b->name | - | ||||||||||||||||||
253 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
254 | b->name | - | ||||||||||||||||||
255 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
256 | b->name | - | ||||||||||||||||||
257 | ) == 1) ? __builtin_strcmp ( | - | ||||||||||||||||||
258 | a->name | - | ||||||||||||||||||
259 | , | - | ||||||||||||||||||
260 | b->name | - | ||||||||||||||||||
261 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - | ||||||||||||||||||
262 | b->name | - | ||||||||||||||||||
263 | ); int __result = (((const unsigned char *) (const char *) ( | - | ||||||||||||||||||
264 | a->name | - | ||||||||||||||||||
265 | ))[0] - __s2[0]); if (__s1_len > 0
| 0 | ||||||||||||||||||
266 | a->name | - | ||||||||||||||||||
267 | ))[1] - __s2[1]); if (__s1_len > 1
| 0 | ||||||||||||||||||
268 | a->name | - | ||||||||||||||||||
269 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( a->name ))[3] - __s2[3]); | 0 | ||||||||||||||||||
270 | a->name never executed: __result = (((const unsigned char *) (const char *) ( a->name ))[3] - __s2[3]); | 0 | ||||||||||||||||||
271 | ))[3] - __s2[3]); never executed: }__result = (((const unsigned char *) (const char *) ( a->name ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : (__builtin_constant_p (end of block | 0 | ||||||||||||||||||
272 | b->name | - | ||||||||||||||||||
273 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
274 | b->name | - | ||||||||||||||||||
275 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
276 | b->name | - | ||||||||||||||||||
277 | ) == 1) && (__s2_len = __builtin_strlen ( | - | ||||||||||||||||||
278 | b->name | - | ||||||||||||||||||
279 | ), __s2_len < 4) ? (__builtin_constant_p ( | - | ||||||||||||||||||
280 | a->name | - | ||||||||||||||||||
281 | ) && ((size_t)(const void *)(( | - | ||||||||||||||||||
282 | a->name | - | ||||||||||||||||||
283 | ) + 1) - (size_t)(const void *)( | - | ||||||||||||||||||
284 | a->name | - | ||||||||||||||||||
285 | ) == 1) ? __builtin_strcmp ( | - | ||||||||||||||||||
286 | a->name | - | ||||||||||||||||||
287 | , | - | ||||||||||||||||||
288 | b->name | - | ||||||||||||||||||
289 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) ( | - | ||||||||||||||||||
290 | a->name | - | ||||||||||||||||||
291 | ); int __result = (((const unsigned char *) (const char *) ( | - | ||||||||||||||||||
292 | b->name | - | ||||||||||||||||||
293 | ))[0] - __s2[0]); if (__s2_len > 0
| 0 | ||||||||||||||||||
294 | b->name | - | ||||||||||||||||||
295 | ))[1] - __s2[1]); if (__s2_len > 1
| 0 | ||||||||||||||||||
296 | b->name | - | ||||||||||||||||||
297 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( b->name ))[3] - __s2[3]); | 0 | ||||||||||||||||||
298 | b->name never executed: __result = (((const unsigned char *) (const char *) ( b->name ))[3] - __s2[3]); | 0 | ||||||||||||||||||
299 | ))[3] - __s2[3]); never executed: }__result = (((const unsigned char *) (const char *) ( b->name ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : __builtin_strcmp (end of block | 0 | ||||||||||||||||||
300 | a->name | - | ||||||||||||||||||
301 | , | - | ||||||||||||||||||
302 | b->name | - | ||||||||||||||||||
303 | )))); }) | - | ||||||||||||||||||
304 | ; | - | ||||||||||||||||||
305 | return executed 37 times by 1 test: (i);return (i); Executed by:
executed 37 times by 1 test: return (i); Executed by:
| 37 | ||||||||||||||||||
306 | } else if (a->name == b->name
| 0-2 | ||||||||||||||||||
307 | return executed 2 times by 1 test: (0);return (0); Executed by:
executed 2 times by 1 test: return (0); Executed by:
| 2 | ||||||||||||||||||
308 | else | - | ||||||||||||||||||
309 | return never executed: ((return ((a->name == ((void *)0) )?-1 : 1);
never executed: return ((a->name == ((void *)0) )?-1 : 1); | 0 | ||||||||||||||||||
310 | ((void *)0)
never executed: return ((a->name == ((void *)0) )?-1 : 1); | 0 | ||||||||||||||||||
311 | )
never executed: return ((a->name == ((void *)0) )?-1 : 1); | 0 | ||||||||||||||||||
312 | } | - | ||||||||||||||||||
313 | - | |||||||||||||||||||
314 | static int conf_value_LHASH_COMP(const void *arg1, const void *arg2) { const CONF_VALUE *a = arg1; const CONF_VALUE *b = arg2; return executed 39 times by 1 test: conf_value_cmp(a,b);return conf_value_cmp(a,b); Executed by:
executed 39 times by 1 test: }return conf_value_cmp(a,b); Executed by:
| 39 | ||||||||||||||||||
315 | - | |||||||||||||||||||
316 | int | - | ||||||||||||||||||
317 | _CONF_new_data(CONF *conf) | - | ||||||||||||||||||
318 | { | - | ||||||||||||||||||
319 | if (conf ==
| 0-2 | ||||||||||||||||||
320 | ((void *)0)
| 0-2 | ||||||||||||||||||
321 | ) { | - | ||||||||||||||||||
322 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
323 | } | - | ||||||||||||||||||
324 | if (conf->data ==
| 0-2 | ||||||||||||||||||
325 | ((void *)0)
| 0-2 | ||||||||||||||||||
326 | ) | - | ||||||||||||||||||
327 | if ((
| 0-2 | ||||||||||||||||||
328 | ((void *)0)
| 0-2 | ||||||||||||||||||
329 | ) { | - | ||||||||||||||||||
330 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||
331 | } | - | ||||||||||||||||||
332 | return executed 2 times by 1 test: 1;return 1; Executed by:
executed 2 times by 1 test: return 1; Executed by:
| 2 | ||||||||||||||||||
333 | } | - | ||||||||||||||||||
334 | - | |||||||||||||||||||
335 | void | - | ||||||||||||||||||
336 | _CONF_free_data(CONF *conf) | - | ||||||||||||||||||
337 | { | - | ||||||||||||||||||
338 | if (conf ==
| 1-214 | ||||||||||||||||||
339 | ((void *)0)
| 1-214 | ||||||||||||||||||
340 | || conf->data ==
| 2-212 | ||||||||||||||||||
341 | ((void *)0)
| 2-212 | ||||||||||||||||||
342 | ) | - | ||||||||||||||||||
343 | return; executed 213 times by 2 tests: return; Executed by:
| 213 | ||||||||||||||||||
344 | - | |||||||||||||||||||
345 | (((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0)))->down_load) = 0; | - | ||||||||||||||||||
346 | - | |||||||||||||||||||
347 | - | |||||||||||||||||||
348 | lh_doall_arg(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))), value_free_hash_LHASH_DOALL_ARG, ((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))) | - | ||||||||||||||||||
349 | - | |||||||||||||||||||
350 | ; | - | ||||||||||||||||||
351 | - | |||||||||||||||||||
352 | - | |||||||||||||||||||
353 | - | |||||||||||||||||||
354 | - | |||||||||||||||||||
355 | lh_doall(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))), value_free_stack_LHASH_DOALL); | - | ||||||||||||||||||
356 | lh_free(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0)))); | - | ||||||||||||||||||
357 | } executed 2 times by 1 test: end of block Executed by:
| 2 | ||||||||||||||||||
358 | - | |||||||||||||||||||
359 | static void | - | ||||||||||||||||||
360 | value_free_hash_doall_arg(CONF_VALUE *a, struct lhash_st_CONF_VALUE *conf) | - | ||||||||||||||||||
361 | { | - | ||||||||||||||||||
362 | if (a->name !=
| 6-24 | ||||||||||||||||||
363 | ((void *)0)
| 6-24 | ||||||||||||||||||
364 | ) | - | ||||||||||||||||||
365 | ( executed 24 times by 1 test: void)((CONF_VALUE *)lh_delete(((_LHASH *)((void*) (1 ? conf : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? a : (CONF_VALUE*)0))));(void)((CONF_VALUE *)lh_delete(((_LHASH *)((void*) (1 ? conf : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? a : (CONF_VALUE*)0)))); Executed by:
executed 24 times by 1 test: (void)((CONF_VALUE *)lh_delete(((_LHASH *)((void*) (1 ? conf : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? a : (CONF_VALUE*)0)))); Executed by:
| 24 | ||||||||||||||||||
366 | } executed 30 times by 1 test: end of block Executed by:
| 30 | ||||||||||||||||||
367 | - | |||||||||||||||||||
368 | static void | - | ||||||||||||||||||
369 | value_free_stack_doall(CONF_VALUE *a) | - | ||||||||||||||||||
370 | { | - | ||||||||||||||||||
371 | CONF_VALUE *vv; | - | ||||||||||||||||||
372 | struct stack_st_CONF_VALUE *sk; | - | ||||||||||||||||||
373 | int i; | - | ||||||||||||||||||
374 | - | |||||||||||||||||||
375 | if (a->name !=
| 0-6 | ||||||||||||||||||
376 | ((void *)0)
| 0-6 | ||||||||||||||||||
377 | ) | - | ||||||||||||||||||
378 | return; never executed: return; | 0 | ||||||||||||||||||
379 | - | |||||||||||||||||||
380 | sk = (struct stack_st_CONF_VALUE *)a->value; | - | ||||||||||||||||||
381 | for (i = sk_num(((_STACK*) (1 ? (sk) : (struct stack_st_CONF_VALUE*)0))) - 1; i >= 0
| 6-24 | ||||||||||||||||||
382 | vv = ((CONF_VALUE *)sk_value(((_STACK*) (1 ? (sk) : (struct stack_st_CONF_VALUE*)0)), (i))); | - | ||||||||||||||||||
383 | free(vv->value); | - | ||||||||||||||||||
384 | free(vv->name); | - | ||||||||||||||||||
385 | free(vv); | - | ||||||||||||||||||
386 | } executed 24 times by 1 test: end of block Executed by:
| 24 | ||||||||||||||||||
387 | if (sk !=
| 0-6 | ||||||||||||||||||
388 | ((void *)0)
| 0-6 | ||||||||||||||||||
389 | ) | - | ||||||||||||||||||
390 | sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_CONF_VALUE*)0))); executed 6 times by 1 test: sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_CONF_VALUE*)0))); Executed by:
| 6 | ||||||||||||||||||
391 | free(a->section); | - | ||||||||||||||||||
392 | free(a); | - | ||||||||||||||||||
393 | } executed 6 times by 1 test: end of block Executed by:
| 6 | ||||||||||||||||||
394 | - | |||||||||||||||||||
395 | - | |||||||||||||||||||
396 | CONF_VALUE * | - | ||||||||||||||||||
397 | _CONF_new_section(CONF *conf, const char *section) | - | ||||||||||||||||||
398 | { | - | ||||||||||||||||||
399 | struct stack_st_CONF_VALUE *sk = | - | ||||||||||||||||||
400 | ((void *)0) | - | ||||||||||||||||||
401 | ; | - | ||||||||||||||||||
402 | int ok = 0, i; | - | ||||||||||||||||||
403 | CONF_VALUE *v = | - | ||||||||||||||||||
404 | ((void *)0) | - | ||||||||||||||||||
405 | , *vv; | - | ||||||||||||||||||
406 | - | |||||||||||||||||||
407 | if ((
| 0-6 | ||||||||||||||||||
408 | ((void *)0)
| 0-6 | ||||||||||||||||||
409 | ) | - | ||||||||||||||||||
410 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
411 | if ((
| 0-6 | ||||||||||||||||||
412 | ((void *)0)
| 0-6 | ||||||||||||||||||
413 | ) | - | ||||||||||||||||||
414 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
415 | i = strlen(section) + 1; | - | ||||||||||||||||||
416 | if ((
| 0-6 | ||||||||||||||||||
417 | ((void *)0)
| 0-6 | ||||||||||||||||||
418 | ) | - | ||||||||||||||||||
419 | goto never executed: err;goto err; never executed: goto err; | 0 | ||||||||||||||||||
420 | - | |||||||||||||||||||
421 | memcpy(v->section, section, i); | - | ||||||||||||||||||
422 | v->name = | - | ||||||||||||||||||
423 | ((void *)0) | - | ||||||||||||||||||
424 | ; | - | ||||||||||||||||||
425 | v->value = (char *)sk; | - | ||||||||||||||||||
426 | - | |||||||||||||||||||
427 | vv = ((CONF_VALUE *)lh_insert(((_LHASH *)((void*) (1 ? conf->data : (struct lhash_st_CONF_VALUE*)0))), ((void*) (1 ? v : (CONF_VALUE*)0)))); | - | ||||||||||||||||||
428 | (void)((vv == | - | ||||||||||||||||||
429 | ((void *)0) | - | ||||||||||||||||||
430 | ) ? 0 : (OpenSSLDie(__FILE__, 268, "vv == NULL"),1)); | - | ||||||||||||||||||
431 | ok = 1; | - | ||||||||||||||||||
432 | - | |||||||||||||||||||
433 | err: code before this statement executed 6 times by 1 test: err: Executed by:
| 6 | ||||||||||||||||||
434 | if (!ok
| 0-6 | ||||||||||||||||||
435 | if (sk !=
| 0 | ||||||||||||||||||
436 | ((void *)0)
| 0 | ||||||||||||||||||
437 | ) | - | ||||||||||||||||||
438 | sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_CONF_VALUE*)0))); never executed: sk_free(((_STACK*) (1 ? (sk) : (struct stack_st_CONF_VALUE*)0))); | 0 | ||||||||||||||||||
439 | free(v); | - | ||||||||||||||||||
440 | v = | - | ||||||||||||||||||
441 | ((void *)0) | - | ||||||||||||||||||
442 | ; | - | ||||||||||||||||||
443 | } never executed: end of block | 0 | ||||||||||||||||||
444 | return executed 6 times by 1 test: (v);return (v); Executed by:
executed 6 times by 1 test: return (v); Executed by:
| 6 | ||||||||||||||||||
445 | } | - | ||||||||||||||||||
Switch to Source code | Preprocessed file |