X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=lib%2Fbloom.c;h=f4f9b6b9ee2dfd84e78990f99ddf67aa29e36a2d;hb=51ec037c71d3badd9418524d63b8cca549f6ff5d;hp=7a9ebaa9360ce4285a15d2129fa859e45b9c4ee5;hpb=214e2d5655f79e75f492167fba97785f4ce53d07;p=fio.git diff --git a/lib/bloom.c b/lib/bloom.c index 7a9ebaa9..f4f9b6b9 100644 --- a/lib/bloom.c +++ b/lib/bloom.c @@ -1,9 +1,7 @@ #include -#include #include "bloom.h" #include "../hash.h" -#include "../minmax.h" #include "../crc/xxhash.h" #include "../crc/murmur3.h" #include "../crc/crc32c.h" @@ -104,8 +102,10 @@ static bool __bloom_check(struct bloom *b, const void *data, unsigned int len, if (b->map[index] & (1U << bit)) was_set++; - if (set) + else if (set) b->map[index] |= 1U << bit; + else + break; } return was_set == N_HASHES;