Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/yesno.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | - | |||||||
9 | - | |||||||
10 | _Bool | - | ||||||
11 | - | |||||||
12 | yesno (void) | - | ||||||
13 | { | - | ||||||
14 | - | |||||||
15 | _Bool | - | ||||||
16 | yes; | - | ||||||
17 | - | |||||||
18 | - | |||||||
19 | char *response = | - | ||||||
20 | ((void *)0) | - | ||||||
21 | ; | - | ||||||
22 | size_t response_size = 0; | - | ||||||
23 | ssize_t response_len = getline (&response, &response_size, | - | ||||||
24 | stdin | - | ||||||
25 | ); | - | ||||||
26 | - | |||||||
27 | if (response_len <= 0
| 1-54 | ||||||
28 | yes = executed 1 time by 1 test: yes = 0 ; Executed by:
| 1 | ||||||
29 | 0 executed 1 time by 1 test: yes = 0 ; Executed by:
| 1 | ||||||
30 | ; executed 1 time by 1 test: yes = 0 ; Executed by:
| 1 | ||||||
31 | else | - | ||||||
32 | { | - | ||||||
33 | - | |||||||
34 | - | |||||||
35 | if (response[response_len - 1] == '\n'
| 0-54 | ||||||
36 | response[response_len - 1] = '\0'; executed 54 times by 3 tests: response[response_len - 1] = '\0'; Executed by:
| 54 | ||||||
37 | yes = (0 < rpmatch (response)); | - | ||||||
38 | } executed 54 times by 3 tests: end of block Executed by:
| 54 | ||||||
39 | - | |||||||
40 | free (response); | - | ||||||
41 | return executed 55 times by 3 tests: yes;return yes; Executed by:
executed 55 times by 3 tests: return yes; Executed by:
| 55 | ||||||
42 | } | - | ||||||
Switch to Source code | Preprocessed file |