mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-30 15:08:06 +03:00
Fix static analysis warnings.
This commit is contained in:
parent
e4817c8d89
commit
eda05b3994
9 changed files with 33 additions and 15 deletions
|
|
@ -277,7 +277,8 @@ prof_sample_new_event_wait(tsd_t *tsd) {
|
|||
* otherwise bytes_until_sample would be 0 if u is exactly 1.0.
|
||||
*/
|
||||
uint64_t r = prng_lg_range_u64(tsd_prng_statep_get(tsd), 53);
|
||||
double u = (r == 0U) ? 1.0 : (double)r * (1.0/9007199254740992.0L);
|
||||
double u = (r == 0U) ? 1.0 : (double)((long double)r *
|
||||
(1.0L/9007199254740992.0L));
|
||||
return (uint64_t)(log(u) /
|
||||
log(1.0 - (1.0 / (double)((uint64_t)1U << lg_prof_sample))))
|
||||
+ (uint64_t)1U;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue