From a7cd478dffddb6d3d3109bce9f603139384c673e Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 12 Jan 2016 10:18:50 -0700 Subject: [PATCH] options: fix bs_cmp() Return the int difference between the two, not a bool. Reported-by: Yury Gribov <> Signed-off-by: Jens Axboe --- options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.25.1