Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 8066] tshark -z io, stat reports bad byte counts if filter

Date: Wed, 06 Feb 2013 14:04:18 +0000

changed bug 8066

What Removed Added
CC   [email protected]

Comment # 5 on bug 8066 from
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.