Skip to content

Commit

Permalink
Call hll_init() after doing getopt() processing.
Browse files Browse the repository at this point in the history
This appeases LSan when exiting before doing any processing.
  • Loading branch information
fcambus committed Nov 16, 2021
1 parent 7401e74 commit ed19c80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/logswan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit ed19c80

Please sign in to comment.