OpenCoverage

write-any-file.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/write-any-file.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7_Bool-
8-
9can_write_any_file (void)-
10{-
11 static -
12 _Bool -
13 initialized;-
14 static -
15 _Bool -
16 can_write;-
17-
18 if (! initialized
! initializedDescription
TRUEevaluated 26 times by 3 tests
Evaluated by:
  • cp
  • mv
  • rm
FALSEevaluated 130 times by 1 test
Evaluated by:
  • rm
)
26-130
19 {-
20 -
21 _Bool -
22 can = -
23 0-
24 ;-
25-
26-
27-
28-
29 can = (geteuid () == 0);-
30-
31 can_write = can;-
32 initialized = -
33 1-
34 ;-
35 }
executed 26 times by 3 tests: end of block
Executed by:
  • cp
  • mv
  • rm
26
36-
37 return
executed 156 times by 3 tests: return can_write;
Executed by:
  • cp
  • mv
  • rm
can_write;
executed 156 times by 3 tests: return can_write;
Executed by:
  • cp
  • mv
  • rm
156
38}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2