aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmd/speed.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-05-15 03:31:56 +0000
committerlloyd <[email protected]>2015-05-15 03:31:56 +0000
commita4e88fa2610da732ea1125b1ed970baed6d286bb (patch)
tree10e422f42bcf419bbcec835feb4f41c590286bbe /src/cmd/speed.cpp
parent12eea2e817528e7d1a85e5e80b360eead6e5d206 (diff)
Fix various bugs found by Coverity scanner.
Uninitialized variables, missing divide by zero checks, missing virtual destructor, etc. Only thing serious is bug in TLS maximum fragment decoder; missing breaks in switch statement meant receiver would treat any negotiated max frament as 4k limit.
Diffstat (limited to 'src/cmd/speed.cpp')
-rw-r--r--src/cmd/speed.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/speed.cpp b/src/cmd/speed.cpp
index 185105ee2..516d89d77 100644
--- a/src/cmd/speed.cpp
+++ b/src/cmd/speed.cpp
@@ -109,12 +109,14 @@ void report_results(const std::string& algo,
std::cout << algo;
+ const std::ios::fmtflags flags = std::cout.flags();
for(auto i = results.rbegin(); i != results.rend(); ++i)
{
std::cout << " [" << i->second << "] "
<< std::fixed << std::setprecision(2) << i->first;
}
std::cout << std::endl;
+ std::cout.flags(flags);
}
void time_transform(std::unique_ptr<Transform> tf,