mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 01:00:00 -04:00
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:
commit
029e17844b
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue