From: Jens Axboe Date: Fri, 17 Mar 2017 16:39:42 +0000 (-0600) Subject: is_power_of_2() should return bool X-Git-Tag: fio-2.19~25 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d9bb03d475e918e08c38bd882032ff788daa297f is_power_of_2() should return bool Signed-off-by: Jens Axboe --- 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)); }