From: Jens Axboe Date: Tue, 12 Jan 2016 17:18:50 +0000 (-0700) Subject: options: fix bs_cmp() X-Git-Tag: fio-2.4~10 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=a7cd478dffddb6d3d3109bce9f603139384c673e;p=fio.git options: fix bs_cmp() Return the int difference between the two, not a bool. Reported-by: Yury Gribov <> Signed-off-by: Jens Axboe --- diff --git a/options.c b/options.c index 871552b5..0bf1390a 100644 --- a/options.c +++ b/options.c @@ -41,7 +41,7 @@ static int bs_cmp(const void *p1, const void *p2) const struct bssplit *bsp1 = p1; const struct bssplit *bsp2 = p2; - return bsp1->perc < bsp2->perc; + return (int) bsp1->perc - (int) bsp2->perc; } static int bssplit_ddir(struct thread_options *o, int ddir, char *str)