OpenCoverage

full-write.c #1

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-
8-
9-
10size_t-
11full_read (int fd, void *buf, size_t count)-
12{-
13 size_t total = 0;-
14 char *ptr = ( char *) buf;-
15-
16 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
17 {-
18 size_t n_rw = safe_read (fd, ptr, count);-
19 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
20 break;
executed 102 times by 3 tests: break;
Executed by:
  • cat
  • split
  • yes
102
21 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
22 {-
23 -
24 (*__errno_location ()) -
25 = 0;-
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