Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/full-write.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | size_t | - | ||||||
9 | full_write (int fd, const void *buf, size_t count) | - | ||||||
10 | { | - | ||||||
11 | size_t total = 0; | - | ||||||
12 | const char *ptr = (const char *) buf; | - | ||||||
13 | - | |||||||
14 | while (count > 0
| 36861-38821 | ||||||
15 | { | - | ||||||
16 | size_t n_rw = safe_write (fd, ptr, count); | - | ||||||
17 | if (n_rw == (size_t) -1
| 102-38716 | ||||||
18 | break; executed 102 times by 3 tests: break; Executed by:
| 102 | ||||||
19 | if (n_rw == 0
| 970-37746 | ||||||
20 | { | - | ||||||
21 | - | |||||||
22 | (*__errno_location ()) | - | ||||||
23 | = | - | ||||||
24 | 28 | - | ||||||
25 | ; | - | ||||||
26 | break; executed 970 times by 2 tests: break; Executed by:
| 970 | ||||||
27 | } | - | ||||||
28 | total += n_rw; | - | ||||||
29 | ptr += n_rw; | - | ||||||
30 | count -= n_rw; | - | ||||||
31 | } executed 37746 times by 8 tests: end of block Executed by:
| 37746 | ||||||
32 | - | |||||||
33 | return executed 37933 times by 8 tests: total;return total; Executed by:
executed 37933 times by 8 tests: return total; Executed by:
| 37933 | ||||||
34 | } | - | ||||||
Switch to Source code | Preprocessed file |