Dale Dreiske
changed
bug 8066
Comment # 5
on bug 8066
from Dale Dreiske
It does not look right to me. The "500000)/1000000" should probably be removed
from the calculation of num_rows.
Better yet, why not simplify and clarify the code by:
- renaming t to invl_start, so it is clear it is partner to invl_end;
- get rid of i. I do not see it used for anything but counting the iterations.
- rewrite the for loop by moving and incorporating initialiazation and
increment code for invl_start into the for statement so it looks like:
for (invl_start=0; invl_start<duration; invl_start+=interval) {
- calculate invl_end and last_row like this:
/* Compute the interval for this row */
invl_end = invl_start + interval;
if (invl_end >= duration)
{
last_row = TRUE;
invl_end = duration;
}
- now there is no more need for num_rows so get rid of it, pesky calculation
and all.
You are receiving this mail because:
- You are watching all bug changes.