Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/bio/bss_null.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | static int null_write(BIO *h, const char *buf, int num); | - | ||||||
4 | static int null_read(BIO *h, char *buf, int size); | - | ||||||
5 | static int null_puts(BIO *h, const char *str); | - | ||||||
6 | static int null_gets(BIO *h, char *str, int size); | - | ||||||
7 | static long null_ctrl(BIO *h, int cmd, long arg1, void *arg2); | - | ||||||
8 | static int null_new(BIO *h); | - | ||||||
9 | static int null_free(BIO *data); | - | ||||||
10 | - | |||||||
11 | static const BIO_METHOD null_method = { | - | ||||||
12 | .type = (6|0x0400), | - | ||||||
13 | .name = "NULL", | - | ||||||
14 | .bwrite = null_write, | - | ||||||
15 | .bread = null_read, | - | ||||||
16 | .bputs = null_puts, | - | ||||||
17 | .bgets = null_gets, | - | ||||||
18 | .ctrl = null_ctrl, | - | ||||||
19 | .create = null_new, | - | ||||||
20 | .destroy = null_free | - | ||||||
21 | }; | - | ||||||
22 | - | |||||||
23 | const BIO_METHOD * | - | ||||||
24 | BIO_s_null(void) | - | ||||||
25 | { | - | ||||||
26 | return executed 1 time by 1 test: (&null_method);return (&null_method); Executed by:
executed 1 time by 1 test: return (&null_method); Executed by:
| 1 | ||||||
27 | } | - | ||||||
28 | - | |||||||
29 | static int | - | ||||||
30 | null_new(BIO *bi) | - | ||||||
31 | { | - | ||||||
32 | bi->init = 1; | - | ||||||
33 | bi->num = 0; | - | ||||||
34 | bi->ptr = ( | - | ||||||
35 | ((void *)0) | - | ||||||
36 | ); | - | ||||||
37 | return executed 1 time by 1 test: (1);return (1); Executed by:
executed 1 time by 1 test: return (1); Executed by:
| 1 | ||||||
38 | } | - | ||||||
39 | - | |||||||
40 | static int | - | ||||||
41 | null_free(BIO *a) | - | ||||||
42 | { | - | ||||||
43 | if (a ==
| 0-1 | ||||||
44 | ((void *)0)
| 0-1 | ||||||
45 | ) | - | ||||||
46 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||
47 | return executed 1 time by 1 test: (1);return (1); Executed by:
executed 1 time by 1 test: return (1); Executed by:
| 1 | ||||||
48 | } | - | ||||||
49 | - | |||||||
50 | static int | - | ||||||
51 | null_read(BIO *b, char *out, int outl) | - | ||||||
52 | { | - | ||||||
53 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||
54 | } | - | ||||||
55 | - | |||||||
56 | static int | - | ||||||
57 | null_write(BIO *b, const char *in, int inl) | - | ||||||
58 | { | - | ||||||
59 | return executed 1 time by 1 test: (inl);return (inl); Executed by:
executed 1 time by 1 test: return (inl); Executed by:
| 1 | ||||||
60 | } | - | ||||||
61 | - | |||||||
62 | static long | - | ||||||
63 | null_ctrl(BIO *b, int cmd, long num, void *ptr) | - | ||||||
64 | { | - | ||||||
65 | long ret = 1; | - | ||||||
66 | - | |||||||
67 | switch (cmd) { | - | ||||||
68 | case never executed: 1:case 1: never executed: case 1: | 0 | ||||||
69 | case never executed: 2:case 2: never executed: case 2: | 0 | ||||||
70 | case never executed: 4:case 4: never executed: case 4: | 0 | ||||||
71 | case never executed: 9:case 9: never executed: case 9: | 0 | ||||||
72 | case executed 2 times by 1 test: 11:case 11: Executed by:
executed 2 times by 1 test: case 11: Executed by:
| 2 | ||||||
73 | case never executed: 12:case 12: never executed: case 12: | 0 | ||||||
74 | ret = 1; | - | ||||||
75 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||
76 | case never executed: 8:case 8: never executed: case 8: | 0 | ||||||
77 | case never executed: 3:case 3: never executed: case 3: | 0 | ||||||
78 | case never executed: 5:case 5: never executed: case 5: | 0 | ||||||
79 | case never executed: 10:case 10: never executed: case 10: | 0 | ||||||
80 | case never executed: 13:case 13: never executed: case 13: | 0 | ||||||
81 | default executed 3 times by 1 test: :default: Executed by:
executed 3 times by 1 test: default: Executed by:
| 3 | ||||||
82 | ret = 0; | - | ||||||
83 | break; executed 3 times by 1 test: break; Executed by:
| 3 | ||||||
84 | } | - | ||||||
85 | return executed 5 times by 1 test: (ret);return (ret); Executed by:
executed 5 times by 1 test: return (ret); Executed by:
| 5 | ||||||
86 | } | - | ||||||
87 | - | |||||||
88 | static int | - | ||||||
89 | null_gets(BIO *bp, char *buf, int size) | - | ||||||
90 | { | - | ||||||
91 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||
92 | } | - | ||||||
93 | - | |||||||
94 | static int | - | ||||||
95 | null_puts(BIO *bp, const char *str) | - | ||||||
96 | { | - | ||||||
97 | if (str ==
| 0 | ||||||
98 | ((void *)0)
| 0 | ||||||
99 | ) | - | ||||||
100 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||
101 | return never executed: (strlen(str));return (strlen(str)); never executed: return (strlen(str)); | 0 | ||||||
102 | } | - | ||||||
Switch to Source code | Preprocessed file |