logswan

Fast Web log analyzer using probabilistic data structures
Log | Files | Refs | README | LICENSE

commit ed19c80a261ba193cf9dd5b2a3f7d7f9593e382e
parent 7401e7406458729ee93001b307abac0eec1c7d29
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 16 Nov 2021 12:28:57 +0100

Call hll_init() after doing getopt() processing.

This appeases LSan when exiting before doing any processing.

Diffstat:
Msrc/logswan.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/logswan.c b/src/logswan.c @@ -104,9 +104,6 @@ main(int argc, char *argv[]) } #endif - hll_init(&unique_ipv4, HLL_BITS); - hll_init(&unique_ipv6, HLL_BITS); - while ((opt = getopt(argc, argv, "d:ghv")) != -1) { switch (opt) { case 'd': @@ -134,6 +131,9 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } + hll_init(&unique_ipv4, HLL_BITS); + hll_init(&unique_ipv6, HLL_BITS); + /* Starting timer */ clock_gettime(CLOCK_MONOTONIC, &begin);