During the creation of the topusers report, if the the report consist
entirely of failed connection without any byte downloaded, the incache
and outcache are both zero and don't sum up to 100%. This is expected and
should not output a warning about corrupted data.
ouperc=(tnbytes) ? oucac * 100. / tnbytes : 0.;
fprintf(fp_top3,"<td class=\"data\">%3.2lf%%</td><td class=\"data\">%3.2lf%%</td>",inperc,ouperc);
#ifdef ENABLE_DOUBLE_CHECK_DATA
- if (fabs(inperc+ouperc-100.)>=0.01) {
+ if ((inperc!=0. || ouperc!=0.) && fabs(inperc+ouperc-100.)>=0.01) {
debuga(_("The total of the in-cache and cache-miss is not 100%% at position %d (user %s)\n"),posicao,uinfo->label);
}
#endif