summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-08-10 21:10:23 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-08-10 21:12:52 +0200
commite3f7ecc6bdf7bbd1ae7ec10c387e15743842db90 (patch)
treebbe2e05ec16f4214e02dd9e0904af97998955c63 /test
parent725cb48b8909588b41c86c680e40b0a7df13e384 (diff)
Fix some issues and improvements found by cppcheck
Diffstat (limited to 'test')
-rw-r--r--test/test-http.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test-http.cc b/test/test-http.cc
index 73f5261..90cb844 100644
--- a/test/test-http.cc
+++ b/test/test-http.cc
@@ -341,15 +341,18 @@ bool tokens(std::string const& in, char const* header, ...) {
if (!iter->valid()) {
std::cerr << "tokens:" << header << ": Expected " << token << " got "
<< "no more tokens" << std::endl;
+ va_end(tokens);
return false;
}
if (iter->token().compare(token)) {
std::cerr << "tokens:" << header << ": Expected " << token << " got "
<< iter->token() << std::endl;
+ va_end(tokens);
return false;
}
iter->next();
}
+ va_end(tokens);
if (iter->valid()) {
std::cerr << "tokens:" << header << ": Expected no more tokens got "
<< iter->token() << std::endl;