OpenCoverage

full-write.c #2

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/full-write.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8size_t-
9full_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
count > 0Description
TRUEevaluated 38821 times by 8 tests
Evaluated by:
  • cat
  • cp
  • factor
  • ginstall
  • head
  • mv
  • split
  • yes
FALSEevaluated 36861 times by 8 tests
Evaluated by:
  • cat
  • cp
  • factor
  • ginstall
  • head
  • mv
  • split
  • yes
)
36861-38821
15 {-
16 size_t n_rw = safe_write (fd, ptr, count);-
17 if (n_rw == (size_t) -1
n_rw == (size_t) -1Description
TRUEevaluated 102 times by 3 tests
Evaluated by:
  • cat
  • split
  • yes
FALSEevaluated 38716 times by 8 tests
Evaluated by:
  • cat
  • cp
  • factor
  • ginstall
  • head
  • mv
  • split
  • yes
)
102-38716
18 break;
executed 102 times by 3 tests: break;
Executed by:
  • cat
  • split
  • yes
102
19 if (n_rw == 0
n_rw == 0Description
TRUEevaluated 970 times by 2 tests
Evaluated by:
  • ginstall
  • head
FALSEevaluated 37746 times by 8 tests
Evaluated by:
  • cat
  • cp
  • factor
  • ginstall
  • head
  • mv
  • split
  • yes
)
970-37746
20 {-
21 -
22 (*__errno_location ()) -
23 = -
24 28-
25 ;-
26 break;
executed 970 times by 2 tests: break;
Executed by:
  • ginstall
  • head
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:
  • cat
  • cp
  • factor
  • ginstall
  • head
  • mv
  • split
  • yes
37746
32-
33 return
executed 37933 times by 8 tests: return total;
Executed by:
  • cat
  • cp
  • factor
  • ginstall
  • head
  • mv
  • split
  • yes
total;
executed 37933 times by 8 tests: return total;
Executed by:
  • cat
  • cp
  • factor
  • ginstall
  • head
  • mv
  • split
  • yes
37933
34}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2