Skip to content

Commit

Permalink
is_power_of_2() should return bool
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
axboe committed Mar 17, 2017
1 parent 7c96135 commit d9bb03d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/pow2.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
#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));
}
Expand Down

0 comments on commit d9bb03d

Please sign in to comment.