From: Jens Axboe Date: Wed, 7 Nov 2012 15:12:43 +0000 (+0100) Subject: zipf: cleanup X-Git-Tag: fio-2.0.11~24 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=1442ba18b74e353ecbdf828b43f965648de2d546 zipf: cleanup Signed-off-by: Jens Axboe --- diff --git a/lib/zipf.c b/lib/zipf.c index 8cd25864..21aaa36b 100644 --- a/lib/zipf.c +++ b/lib/zipf.c @@ -99,21 +99,16 @@ static void shared_rand_init(struct zipf_state *zs, unsigned long nranges) void zipf_init(struct zipf_state *zs, unsigned long nranges, double theta) { - unsigned int i; - shared_rand_init(zs, nranges); zs->theta = theta; - - for (i = 1; i <= 2; i++) - zs->zeta2 += pow(1.0 / (double) i, zs->theta); + zs->zeta2 = pow(1.0, zs->theta) + pow(0.5, zs->theta); zipf_load_gen_zeta(zs); } unsigned long long zipf_next(struct zipf_state *zs) { - double alpha, eta, rand_uni, rand_z; unsigned long long n = zs->nranges; unsigned long long val;