2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 01:59:26 +00:00

Silence potential divide by zero warning in qpmulti.c

Coverity flagged a potential divide by zero error in collect in
qpmulti.c when the elapsed time is zero but that is only called
once the elapsed time is greater than or equal to RUNTIME (1/4
second) so INSIST this is the case.
This commit is contained in:
Mark Andrews 2025-05-30 10:51:21 +10:00
parent 9ee1f50de0
commit 081dbb1108

View File

@ -756,6 +756,8 @@ collect(void *varg) {
stats[mut].compactions += tp->compactions;
}
INSIST(elapsed >= RUNTIME);
printf("%7.3f\t", RUNTIME / (double)NS_PER_SEC);
printf("%7.3f\t", elapsed / (double)NS_PER_SEC);
printf("%7.3f\t", load_time);