Signed-off-by: Jens Axboe <axboe@fb.com>
-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;
{
uint32_t hash[N_HASHES];
int i, was_set;
return was_set == N_HASHES;
}
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);
#define FIO_BLOOM_H
#include <inttypes.h>
#define FIO_BLOOM_H
#include <inttypes.h>
+#include "../lib/types.h"
struct bloom;
struct bloom *bloom_new(uint64_t entries);
void bloom_free(struct bloom *b);
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);