| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/fclose.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | int | - | ||||||||||||
| 7 | rpl_fclose (FILE *fp) | - | ||||||||||||
| 8 | { | - | ||||||||||||
| 9 | int saved_errno = 0; | - | ||||||||||||
| 10 | int fd; | - | ||||||||||||
| 11 | int result = 0; | - | ||||||||||||
| 12 | - | |||||||||||||
| 13 | - | |||||||||||||
| 14 | fd = fileno (fp); | - | ||||||||||||
| 15 | if (fd < 0
| 0-90762 | ||||||||||||
| 16 | return never executed: fclose (fp);return fclose (fp);never executed: return fclose (fp); | 0 | ||||||||||||
| 17 | - | |||||||||||||
| 18 | - | |||||||||||||
| 19 | - | |||||||||||||
| 20 | - | |||||||||||||
| 21 | if ((!(__freading (fp) != 0)
| 3204-79246 | ||||||||||||
| 22 | 1
| 3204-8312 | ||||||||||||
| 23 | ) != -1
| 3204-8312 | ||||||||||||
| 24 | && | - | ||||||||||||
| 25 | rpl_fflush
| 4-87554 | ||||||||||||
| 26 | (fp)
| 4-87554 | ||||||||||||
| 27 | saved_errno = executed 4 times by 1 test: saved_errno = (*__errno_location ()) ;Executed by:
| 4 | ||||||||||||
| 28 | (*__errno_location ()) executed 4 times by 1 test: saved_errno = (*__errno_location ()) ;Executed by:
| 4 | ||||||||||||
| 29 | ; executed 4 times by 1 test: saved_errno = (*__errno_location ()) ;Executed by:
| 4 | ||||||||||||
| 30 | result = fclose (fp); | - | ||||||||||||
| 31 | - | |||||||||||||
| 32 | - | |||||||||||||
| 33 | - | |||||||||||||
| 34 | - | |||||||||||||
| 35 | if (saved_errno != 0
| 4-90758 | ||||||||||||
| 36 | { | - | ||||||||||||
| 37 | - | |||||||||||||
| 38 | (*__errno_location ()) | - | ||||||||||||
| 39 | = saved_errno; | - | ||||||||||||
| 40 | result = | - | ||||||||||||
| 41 | (-1) | - | ||||||||||||
| 42 | ; | - | ||||||||||||
| 43 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||
| 44 | - | |||||||||||||
| 45 | return executed 90762 times by 106 tests: result;return result;Executed by:
executed 90762 times by 106 tests: return result;Executed by:
| 90762 | ||||||||||||
| 46 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |