OpenCoverage

strlcat.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/compat/strlcat.c
Switch to Source codePreprocessed file
LineSourceCount
1size_t-
2strlcat(char *dst, const char *src, size_t dsize)-
3{-
4 const char *odst = dst;-
5 const char *osrc = src;-
6 size_t n = dsize;-
7 size_t dlen;-
8-
9-
10 while (n-- != 0
n-- != 0Description
TRUEevaluated 74 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEnever evaluated
&& *
*dst != '\0'Description
TRUEevaluated 66 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
dst != '\0'
*dst != '\0'Description
TRUEevaluated 66 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
)
0-74
11 dst++;
executed 66 times by 1 test: dst++;
Executed by:
  • libcrypto.so.44.0.1
66
12 dlen = dst - odst;-
13 n = dsize - dlen;-
14-
15 if (n-- == 0
n-- == 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
)
0-8
16 return
never executed: return(dlen + strlen(src));
(dlen + strlen(src));
never executed: return(dlen + strlen(src));
0
17 while (*
*src != '\0'Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
src != '\0'
*src != '\0'Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
) {
8
18 if (n != 0
n != 0Description
TRUEevaluated 8 times by 1 test
Evaluated by:
  • libcrypto.so.44.0.1
FALSEnever evaluated
) {
0-8
19 *dst++ = *src;-
20 n--;-
21 }
executed 8 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
8
22 src++;-
23 }
executed 8 times by 1 test: end of block
Executed by:
  • libcrypto.so.44.0.1
8
24 *dst = '\0';-
25-
26 return
executed 8 times by 1 test: return(dlen + (src - osrc));
Executed by:
  • libcrypto.so.44.0.1
(dlen + (src - osrc));
executed 8 times by 1 test: return(dlen + (src - osrc));
Executed by:
  • libcrypto.so.44.0.1
8
27}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2