server: fix bug in converting/storing clat percentiles
It helps when you read the source values, instead of storing and
converting the destinations values only.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/server.c b/server.c
index 2c20e37..dcce37e 100644
--- a/server.c
+++ b/server.c
@@ -671,9 +671,10 @@
p.ts.clat_percentiles = cpu_to_le64(ts->clat_percentiles);
for (i = 0; i < FIO_IO_U_LIST_MAX_LEN; i++) {
- fio_fp64_t *fp = &p.ts.percentile_list[i];
+ fio_fp64_t *src = &ts->percentile_list[i];
+ fio_fp64_t *dst = &p.ts.percentile_list[i];
- fp->u.i = __cpu_to_le64(fio_double_to_uint64(fp->u.f));
+ dst->u.i = __cpu_to_le64(fio_double_to_uint64(src->u.f));
}
for (i = 0; i < FIO_IO_U_MAP_NR; i++) {