Skip to content

Commit

Permalink
Merge pull request appneta#179 from sethhall/bytes_sec_X10_overflow_fix
Browse files Browse the repository at this point in the history
Fixes an issue with Rated pkt stats overflowing.
  • Loading branch information
fklassen committed May 1, 2015
2 parents fdad08a + 6696f0e commit 1da2f48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ packet_stats(const tcpreplay_stats_t *stats)
COUNTER bytes_sec_X10;
COUNTER mb_sec_X100;

bytes_sec_X10 = (stats->bytes_sent * 10 * 1000 * 1000) / diff_us;
bytes_sec_X10 = ((stats->bytes_sent * 10 * 1000) / diff_us) * 1000;
bytes_sec = bytes_sec_X10 / 10;
bytes_sec_10ths = bytes_sec_X10 % 10;

Expand Down

0 comments on commit 1da2f48

Please sign in to comment.