projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7c96135
)
is_power_of_2() should return bool
author
Jens Axboe
<axboe@fb.com>
Fri, 17 Mar 2017 16:39:42 +0000
(10:39 -0600)
committer
Jens Axboe
<axboe@fb.com>
Fri, 17 Mar 2017 16:39:42 +0000
(10:39 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
lib/pow2.h
patch
|
blob
|
blame
|
history
diff --git
a/lib/pow2.h
b/lib/pow2.h
index f3ca4d7b86c2213fd4d33901c1aff09a26260b69..2cbca1ab3484d55757e9c1785a5459d674d5328c 100644
(file)
--- a/
lib/pow2.h
+++ b/
lib/pow2.h
@@
-2,8
+2,9
@@
#define FIO_POW2_H
#include <inttypes.h>
#define FIO_POW2_H
#include <inttypes.h>
+#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));
}
{
return (val != 0 && ((val & (val - 1)) == 0));
}