Merge pull request #2610 from babarosaM33/bloom_reset

ppbloom: save free() and subsequent init() overhead
This commit is contained in:
Max Lv
2020-01-29 19:54:02 +08:00
committed by GitHub
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -88,8 +88,7 @@ ppbloom_add(const void *buffer, int len)
if (bloom_count[current] >= entries) {
bloom_count[current] = 0;
current = current == PING ? PONG : PING;
bloom_free(ppbloom + current);
bloom_init(ppbloom + current, entries, error);
bloom_reset(ppbloom + current);
}
return 0;