Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | size_t | - |
7 | buffer_lcm (size_t a, size_t b, size_t lcm_max) | - |
8 | { | - |
9 | size_t size; | - |
10 | | - |
11 | | - |
12 | if (!aTRUE | never evaluated | FALSE | evaluated 4371 times by 3 tests |
) | 0-4371 |
13 | size = bTRUE | never evaluated | FALSE | never evaluated |
? b : 8 * 1024;never executed: size = b ? b : 8 * 1024; | 0 |
14 | else | - |
15 | { | - |
16 | if (bTRUE | evaluated 4371 times by 3 tests | FALSE | never evaluated |
) | 0-4371 |
17 | { | - |
18 | | - |
19 | | - |
20 | | - |
21 | size_t lcm, m, n, q, r; | - |
22 | | - |
23 | | - |
24 | for (m = a, n = b; (TRUE | never evaluated | FALSE | evaluated 4371 times by 3 tests |
r = m % n) != 0TRUE | never evaluated | FALSE | evaluated 4371 times by 3 tests |
; m = n, n = r) | 0-4371 |
25 | continue; never executed: continue; | 0 |
26 | | - |
27 | | - |
28 | q = a / n; | - |
29 | lcm = q * b; | - |
30 | if (lcm <= lcm_maxTRUE | evaluated 4371 times by 3 tests | FALSE | never evaluated |
&& lcm / b == qTRUE | evaluated 4371 times by 3 tests | FALSE | never evaluated |
) | 0-4371 |
31 | returnexecuted 4371 times by 3 tests: return lcm; lcm;executed 4371 times by 3 tests: return lcm; | 4371 |
32 | } never executed: end of block | 0 |
33 | | - |
34 | size = a; | - |
35 | } never executed: end of block | 0 |
36 | | - |
37 | return never executed: return size <= lcm_max ? size : lcm_max; size <= lcm_max ? size : lcm_max;never executed: return size <= lcm_max ? size : lcm_max; | 0 |
38 | } | - |
| | |