Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssh/src/openbsd-compat/strlcpy.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | - | |||||||||||||
6 | - | |||||||||||||
7 | - | |||||||||||||
8 | - | |||||||||||||
9 | - | |||||||||||||
10 | - | |||||||||||||
11 | size_t | - | ||||||||||||
12 | strlcpy(char *dst, const char *src, size_t siz) | - | ||||||||||||
13 | { | - | ||||||||||||
14 | char *d = dst; | - | ||||||||||||
15 | const char *s = src; | - | ||||||||||||
16 | size_t n = siz; | - | ||||||||||||
17 | - | |||||||||||||
18 | - | |||||||||||||
19 | if (n != 0
| 0-7692 | ||||||||||||
20 | while (--
| 7565-444889 | ||||||||||||
21 | if ((*
| 127-444762 | ||||||||||||
22 | break; executed 127 times by 5 tests: break; Executed by:
| 127 | ||||||||||||
23 | } executed 444762 times by 7 tests: end of block Executed by:
| 444762 | ||||||||||||
24 | } executed 7692 times by 7 tests: end of block Executed by:
| 7692 | ||||||||||||
25 | - | |||||||||||||
26 | - | |||||||||||||
27 | if (n == 0
| 127-7565 | ||||||||||||
28 | if (siz != 0
| 0-7565 | ||||||||||||
29 | * executed 7565 times by 5 tests: d = '\0';*d = '\0'; Executed by:
executed 7565 times by 5 tests: *d = '\0'; Executed by:
| 7565 | ||||||||||||
30 | while (*
| 0-7565 | ||||||||||||
31 | ; never executed: ; | 0 | ||||||||||||
32 | } executed 7565 times by 5 tests: end of block Executed by:
| 7565 | ||||||||||||
33 | - | |||||||||||||
34 | return executed 7692 times by 7 tests: (s - src - 1);return(s - src - 1); Executed by:
executed 7692 times by 7 tests: return(s - src - 1); Executed by:
| 7692 | ||||||||||||
35 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |