diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp
index a4de5a298..06b05339a 100644
--- a/lib/cppcheck.cpp
+++ b/lib/cppcheck.cpp
@@ -215,12 +215,10 @@ unsigned int CppCheck::processFile(const std::string& filename, std::istream& fi
continue;
// dump xml if --dump
- if (_settings.dump) {
- if (fdump.is_open()) {
- fdump << "" << std::endl;
- _tokenizer.dump(fdump);
- fdump << "" << std::endl;
- }
+ if (_settings.dump && fdump.is_open()) {
+ fdump << "" << std::endl;
+ _tokenizer.dump(fdump);
+ fdump << "" << std::endl;
}
// Skip if we already met the same simplified token list