Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gl/lib/fd-reopen.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | int | - | ||||||||||||
9 | fd_reopen (int desired_fd, char const *file, int flags, mode_t mode) | - | ||||||||||||
10 | { | - | ||||||||||||
11 | int fd = open (file, flags, mode); | - | ||||||||||||
12 | - | |||||||||||||
13 | if (fd == desired_fd
| 14-219539 | ||||||||||||
14 | return executed 219553 times by 2 tests: fd;return fd; Executed by:
executed 219553 times by 2 tests: return fd; Executed by:
| 219553 | ||||||||||||
15 | else | - | ||||||||||||
16 | { | - | ||||||||||||
17 | int fd2 = dup2 (fd, desired_fd); | - | ||||||||||||
18 | int saved_errno = | - | ||||||||||||
19 | (*__errno_location ()) | - | ||||||||||||
20 | ; | - | ||||||||||||
21 | close (fd); | - | ||||||||||||
22 | - | |||||||||||||
23 | (*__errno_location ()) | - | ||||||||||||
24 | = saved_errno; | - | ||||||||||||
25 | return executed 4809 times by 4 tests: fd2;return fd2; Executed by:
executed 4809 times by 4 tests: return fd2; Executed by:
| 4809 | ||||||||||||
26 | } | - | ||||||||||||
27 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |