Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/compat/arc4random_uniform.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | uint32_t | - | ||||||
2 | arc4random_uniform(uint32_t upper_bound) | - | ||||||
3 | { | - | ||||||
4 | uint32_t r, min; | - | ||||||
5 | - | |||||||
6 | if (upper_bound < 2
| 0 | ||||||
7 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||
8 | - | |||||||
9 | - | |||||||
10 | min = -upper_bound % upper_bound; | - | ||||||
11 | - | |||||||
12 | - | |||||||
13 | - | |||||||
14 | - | |||||||
15 | - | |||||||
16 | - | |||||||
17 | - | |||||||
18 | for (;;) { | - | ||||||
19 | r = arc4random(); | - | ||||||
20 | if (r >= min
| 0 | ||||||
21 | break; never executed: break; | 0 | ||||||
22 | } never executed: end of block | 0 | ||||||
23 | - | |||||||
24 | return never executed: r % upper_bound;return r % upper_bound; never executed: return r % upper_bound; | 0 | ||||||
25 | } | - | ||||||
Switch to Source code | Preprocessed file |