X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=lib%2Fzipf.c;h=c691bc51a5a57f6e84ef2450d47fb0ad12f02bcc;hb=12bde3697fc230d7af560cecc8ac469ab47643f8;hp=e75dc2aa64409f923daeede3d28941da57b38f4e;hpb=e6f735f0f0e402ca43f589224ccfa2fdf37fa583;p=fio.git diff --git a/lib/zipf.c b/lib/zipf.c index e75dc2aa..c691bc51 100644 --- a/lib/zipf.c +++ b/lib/zipf.c @@ -23,7 +23,7 @@ static void zipf_update(struct zipf_state *zs) * 10M max, that should be doable in 1-2s on even slow machines. * Precision will take a slight hit, but nothing major. */ - to_gen = min(zs->nranges, ZIPF_MAX_GEN); + to_gen = min(zs->nranges, (uint64_t) ZIPF_MAX_GEN); for (i = 0; i < to_gen; i++) zs->zetan += pow(1.0 / (double) (i + 1), zs->theta);