OpenCoverage

fd-safer.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/fd-safer.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4int-
5fd_safer (int fd)-
6{-
7 if (-
8 0
0 <= fdDescription
TRUEevaluated 87721 times by 15 tests
Evaluated by:
  • chgrp
  • chmod
  • chown
  • cp
  • df
  • du
  • ginstall
  • mkdir
  • mv
  • rm
  • shred
  • split
  • stat
  • tac
  • tail
FALSEevaluated 328 times by 8 tests
Evaluated by:
  • cp
  • du
  • ginstall
  • rm
  • shred
  • split
  • tac
  • tail
328-87721
9 <= fd
0 <= fdDescription
TRUEevaluated 87721 times by 15 tests
Evaluated by:
  • chgrp
  • chmod
  • chown
  • cp
  • df
  • du
  • ginstall
  • mkdir
  • mv
  • rm
  • shred
  • split
  • stat
  • tac
  • tail
FALSEevaluated 328 times by 8 tests
Evaluated by:
  • cp
  • du
  • ginstall
  • rm
  • shred
  • split
  • tac
  • tail
&& fd <=
fd <= 2Description
TRUEevaluated 5 times by 3 tests
Evaluated by:
  • cp
  • tac
  • tail
FALSEevaluated 87716 times by 15 tests
Evaluated by:
  • chgrp
  • chmod
  • chown
  • cp
  • df
  • du
  • ginstall
  • mkdir
  • mv
  • rm
  • shred
  • split
  • stat
  • tac
  • tail
5-87721
10 2
fd <= 2Description
TRUEevaluated 5 times by 3 tests
Evaluated by:
  • cp
  • tac
  • tail
FALSEevaluated 87716 times by 15 tests
Evaluated by:
  • chgrp
  • chmod
  • chown
  • cp
  • df
  • du
  • ginstall
  • mkdir
  • mv
  • rm
  • shred
  • split
  • stat
  • tac
  • tail
5-87716
11 )-
12 {-
13 int f = dup_safer (fd);-
14 int e = -
15 (*__errno_location ())-
16 ;-
17 close (fd);-
18 -
19 (*__errno_location ()) -
20 = e;-
21 fd = f;-
22 }
executed 5 times by 3 tests: end of block
Executed by:
  • cp
  • tac
  • tail
5
23-
24 return
executed 88049 times by 15 tests: return fd;
Executed by:
  • chgrp
  • chmod
  • chown
  • cp
  • df
  • du
  • ginstall
  • mkdir
  • mv
  • rm
  • shred
  • split
  • stat
  • tac
  • tail
fd;
executed 88049 times by 15 tests: return fd;
Executed by:
  • chgrp
  • chmod
  • chown
  • cp
  • df
  • du
  • ginstall
  • mkdir
  • mv
  • rm
  • shred
  • split
  • stat
  • tac
  • tail
88049
25}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2