From d9bb03d475e918e08c38bd882032ff788daa297f Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 17 Mar 2017 10:39:42 -0600 Subject: [PATCH 1/1] is_power_of_2() should return bool Signed-off-by: Jens Axboe --- lib/pow2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pow2.h b/lib/pow2.h index f3ca4d7b..2cbca1ab 100644 --- a/lib/pow2.h +++ b/lib/pow2.h @@ -2,8 +2,9 @@ #define FIO_POW2_H #include +#include "types.h" -static inline int is_power_of_2(uint64_t val) +static inline bool is_power_of_2(uint64_t val) { return (val != 0 && ((val & (val - 1)) == 0)); } -- 2.25.1