Refactor jemalloc_ffs*() into ffs_*().

Use appropriate versions to resolve 64-to-32-bit data loss warnings.
This commit is contained in:
Jason Evans
2016-02-24 10:32:45 -08:00
parent b41a07c31a
commit 9f4ee6034c
8 changed files with 72 additions and 42 deletions

View File

@@ -64,7 +64,7 @@ prng_range(uint64_t *state, uint64_t range)
assert(range > 1);
/* Compute the ceiling of lg(range). */
lg_range = jemalloc_ffs64(pow2_ceil_u64(range)) - 1;
lg_range = ffs_u64(pow2_ceil_u64(range)) - 1;
/* Generate a result in [0..range) via repeated trial. */
do {