| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | size_t | - |
| 19 | safe_read (int fd, void *buf, size_t count) | - |
| 20 | { | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | enum { BUGGY_READ_MAXIMUM = 0x7fffffff & ~8191 }; | - |
| 26 | | - |
| 27 | for (;;) | - |
| 28 | { | - |
| 29 | ssize_t result = read (fd, buf, count); | - |
| 30 | | - |
| 31 | if (0 <= result| TRUE | evaluated 110726 times by 14 testsEvaluated by:- cat
- cp
- csplit
- factor
- ginstall
- head
- mv
- split
- sum
- tac
- tail
- tr
- wc
- yes
| | FALSE | evaluated 168 times by 5 tests |
) | 168-110726 |
| 32 | returnexecuted 110726 times by 14 tests: return result;Executed by:- cat
- cp
- csplit
- factor
- ginstall
- head
- mv
- split
- sum
- tac
- tail
- tr
- wc
- yes
result;executed 110726 times by 14 tests: return result;Executed by:- cat
- cp
- csplit
- factor
- ginstall
- head
- mv
- split
- sum
- tac
- tail
- tr
- wc
- yes
| 110726 |
| 33 | else if (((| TRUE | never evaluated | | FALSE | evaluated 168 times by 5 tests |
| 0-168 |
| 34 | (*__errno_location ())| TRUE | never evaluated | | FALSE | evaluated 168 times by 5 tests |
| 0-168 |
| 35 | ) == | TRUE | never evaluated | | FALSE | evaluated 168 times by 5 tests |
| 0-168 |
| 36 | 4| TRUE | never evaluated | | FALSE | evaluated 168 times by 5 tests |
| 0-168 |
| 37 | )| TRUE | never evaluated | | FALSE | evaluated 168 times by 5 tests |
) | 0-168 |
| 38 | continue; never executed: continue; | 0 |
| 39 | else if ( | - |
| 40 | (*| TRUE | evaluated 57 times by 1 test | | FALSE | evaluated 111 times by 5 tests |
__errno_location ()) | TRUE | evaluated 57 times by 1 test | | FALSE | evaluated 111 times by 5 tests |
| 57-111 |
| 41 | == | TRUE | evaluated 57 times by 1 test | | FALSE | evaluated 111 times by 5 tests |
| 57-111 |
| 42 | 22| TRUE | evaluated 57 times by 1 test | | FALSE | evaluated 111 times by 5 tests |
| 57-111 |
| 43 | && BUGGY_READ_MAXIMUM < count| TRUE | never evaluated | | FALSE | evaluated 57 times by 1 test |
) | 0-57 |
| 44 | count = BUGGY_READ_MAXIMUM; never executed: count = BUGGY_READ_MAXIMUM; | 0 |
| 45 | else | - |
| 46 | returnexecuted 168 times by 5 tests: return result; result;executed 168 times by 5 tests: return result; | 168 |
| 47 | } | - |
| 48 | } never executed: end of block | 0 |
| | |