Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/bio/b_print.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | int | - | ||||||||||||
7 | BIO_printf(BIO *bio, const char *format, ...) | - | ||||||||||||
8 | { | - | ||||||||||||
9 | va_list args; | - | ||||||||||||
10 | int ret; | - | ||||||||||||
11 | - | |||||||||||||
12 | - | |||||||||||||
13 | __builtin_va_start( | - | ||||||||||||
14 | args | - | ||||||||||||
15 | , | - | ||||||||||||
16 | format | - | ||||||||||||
17 | ) | - | ||||||||||||
18 | ; | - | ||||||||||||
19 | ret = BIO_vprintf(bio, format, args); | - | ||||||||||||
20 | - | |||||||||||||
21 | __builtin_va_end( | - | ||||||||||||
22 | args | - | ||||||||||||
23 | ) | - | ||||||||||||
24 | ; | - | ||||||||||||
25 | return executed 3108 times by 6 tests: (ret);return (ret); Executed by:
executed 3108 times by 6 tests: return (ret); Executed by:
| 3108 | ||||||||||||
26 | } | - | ||||||||||||
27 | int | - | ||||||||||||
28 | BIO_vprintf(BIO *bio, const char *format, va_list args) | - | ||||||||||||
29 | { | - | ||||||||||||
30 | int ret; | - | ||||||||||||
31 | char *buf = | - | ||||||||||||
32 | ((void *)0) | - | ||||||||||||
33 | ; | - | ||||||||||||
34 | - | |||||||||||||
35 | ret = vasprintf(&buf, format, args); | - | ||||||||||||
36 | if (buf ==
| 0-3108 | ||||||||||||
37 | ((void *)0)
| 0-3108 | ||||||||||||
38 | ) { | - | ||||||||||||
39 | ret = -1; | - | ||||||||||||
40 | goto never executed: fail;goto fail; never executed: goto fail; | 0 | ||||||||||||
41 | } | - | ||||||||||||
42 | BIO_write(bio, buf, ret); | - | ||||||||||||
43 | free(buf); | - | ||||||||||||
44 | fail: code before this statement executed 3108 times by 6 tests: fail: Executed by:
| 3108 | ||||||||||||
45 | return executed 3108 times by 6 tests: (ret);return (ret); Executed by:
executed 3108 times by 6 tests: return (ret); Executed by:
| 3108 | ||||||||||||
46 | } | - | ||||||||||||
47 | int | - | ||||||||||||
48 | BIO_snprintf(char *buf, size_t n, const char *format, ...) | - | ||||||||||||
49 | { | - | ||||||||||||
50 | va_list args; | - | ||||||||||||
51 | int ret; | - | ||||||||||||
52 | - | |||||||||||||
53 | - | |||||||||||||
54 | __builtin_va_start( | - | ||||||||||||
55 | args | - | ||||||||||||
56 | , | - | ||||||||||||
57 | format | - | ||||||||||||
58 | ) | - | ||||||||||||
59 | ; | - | ||||||||||||
60 | ret = vsnprintf(buf, n, format, args); | - | ||||||||||||
61 | - | |||||||||||||
62 | __builtin_va_end( | - | ||||||||||||
63 | args | - | ||||||||||||
64 | ) | - | ||||||||||||
65 | ; | - | ||||||||||||
66 | - | |||||||||||||
67 | if (ret >= n
| 0 | ||||||||||||
68 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
69 | return never executed: (ret);return (ret); never executed: return (ret); | 0 | ||||||||||||
70 | } | - | ||||||||||||
71 | - | |||||||||||||
72 | int | - | ||||||||||||
73 | BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) | - | ||||||||||||
74 | { | - | ||||||||||||
75 | int ret; | - | ||||||||||||
76 | - | |||||||||||||
77 | ret = vsnprintf(buf, n, format, args); | - | ||||||||||||
78 | - | |||||||||||||
79 | if (ret >= n
| 0 | ||||||||||||
80 | return never executed: (-1);return (-1); never executed: return (-1); | 0 | ||||||||||||
81 | return never executed: (ret);return (ret); never executed: return (ret); | 0 | ||||||||||||
82 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |