From 088b17c58d11bab0aa17be2fb2797632e1518281 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 14 Apr 2014 13:13:21 -0600 Subject: [PATCH] Fix is_power_of_2() for longs Signed-off-by: Jens Axboe --- fio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fio.h b/fio.h index 25f6052b..544916f2 100644 --- a/fio.h +++ b/fio.h @@ -588,7 +588,7 @@ static inline unsigned int td_min_bs(struct thread_data *td) return min(td->o.min_bs[DDIR_TRIM], min_bs); } -static inline int is_power_of_2(unsigned int val) +static inline int is_power_of_2(unsigned long val) { return (val != 0 && ((val & (val - 1)) == 0)); } -- 2.25.1