OpenCoverage

memcmp2.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/lib/memcmp2.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6int-
7memcmp2 (const char *s1, size_t n1, const char *s2, size_t n2)-
8{-
9 int cmp = memcmp (s1, s2, n1 <= n2 ? n1 : n2);-
10 if (cmp == 0
cmp == 0Description
TRUEevaluated 169 times by 1 test
Evaluated by:
  • comm
FALSEevaluated 67 times by 1 test
Evaluated by:
  • comm
)
67-169
11 {-
12 if (n1 < n2
n1 < n2Description
TRUEnever evaluated
FALSEevaluated 169 times by 1 test
Evaluated by:
  • comm
)
0-169
13 cmp = -1;
never executed: cmp = -1;
0
14 else if (n1 > n2
n1 > n2Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • comm
FALSEevaluated 168 times by 1 test
Evaluated by:
  • comm
)
1-168
15 cmp = 1;
executed 1 time by 1 test: cmp = 1;
Executed by:
  • comm
1
16 }
executed 169 times by 1 test: end of block
Executed by:
  • comm
169
17 return
executed 236 times by 1 test: return cmp;
Executed by:
  • comm
cmp;
executed 236 times by 1 test: return cmp;
Executed by:
  • comm
236
18}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2