opnsense-ports/security/chaosreader/files/patch-chaosreader
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

15 lines
517 B
Text

--- chaosreader.orig 2010-07-23 11:18:46.000000000 +0300
+++ chaosreader 2010-07-23 11:21:34.000000000 +0300
@@ -4028,7 +4028,11 @@
### This causes the replay program to pause
print REPLAY "ms($timediff1);\n";
}
- $speed = sprintf("%.2f",$bytes / (1024 * $duration));
+ if ( $duration > 0 ) {
+ $speed = sprintf("%.2f",$bytes / (1024 * $duration));
+ } else {
+ $speed = "unknown";
+ }
print REPLAY "print \"\n\n" .
"Summary: $duration2 seconds, $bytes bytes, $speed Kb/sec\\n\";";
close REPLAY;