fix: nil: 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.

Closes #5329

Merge branch '5329-potential-divide-by-zero-in-qpmulti-c' into 'main'

See merge request isc-projects/bind9!10519
This commit is contained in:
Mark Andrews 2025-06-02 23:40:43 +00:00
commit 029e17844b

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);