From: Jens Axboe Date: Fri, 23 Sep 2016 17:33:02 +0000 (-0600) Subject: bloom: use bool X-Git-Tag: fio-2.15~36 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c0d7598348446f4506219d7bb12b293d790aebd5 bloom: use bool Signed-off-by: Jens Axboe --- diff --git a/lib/bloom.c b/lib/bloom.c index f4eff575..8594c977 100644 --- a/lib/bloom.c +++ b/lib/bloom.c @@ -88,8 +88,8 @@ void bloom_free(struct bloom *b) free(b); } -static int __bloom_check(struct bloom *b, uint32_t *data, unsigned int nwords, - int set) +static bool __bloom_check(struct bloom *b, uint32_t *data, unsigned int nwords, + bool set) { uint32_t hash[N_HASHES]; int i, was_set; @@ -113,7 +113,7 @@ static int __bloom_check(struct bloom *b, uint32_t *data, unsigned int nwords, return was_set == N_HASHES; } -int bloom_set(struct bloom *b, uint32_t *data, unsigned int nwords) +bool bloom_set(struct bloom *b, uint32_t *data, unsigned int nwords) { - return __bloom_check(b, data, nwords, 1); + return __bloom_check(b, data, nwords, true); } diff --git a/lib/bloom.h b/lib/bloom.h index 127ed9b7..329fd36a 100644 --- a/lib/bloom.h +++ b/lib/bloom.h @@ -2,11 +2,12 @@ #define FIO_BLOOM_H #include +#include "../lib/types.h" struct bloom; struct bloom *bloom_new(uint64_t entries); void bloom_free(struct bloom *b); -int bloom_set(struct bloom *b, uint32_t *data, unsigned int nwords); +bool bloom_set(struct bloom *b, uint32_t *data, unsigned int nwords); #endif