Low pop statistics are not good.

git-svn-id: file:///svn/unbound/trunk@926 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2008-02-06 13:34:59 +00:00
parent 9be27227a1
commit 0fe0251c8d

View file

@ -198,7 +198,10 @@ timehist_quartile(struct timehist* hist, double q)
if(!hist || hist->num == 0)
return 0.;
/* look for i'th element, interpolated */
lookfor = (double)timehist_count(hist) * q;
lookfor = (double)timehist_count(hist);
if(lookfor < 4)
return 0.; /* not enough elements for a good estimate */
lookfor *= q;
passed = 0;
i = 0;
while(i+1 < hist->num &&