From cf75e2bb28ffcec45f0434ede5cbea4cb3b6b04f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 30 Apr 2013 06:44:50 +0200 Subject: [PATCH] astyle formatting --- lib/checkmemoryleak.cpp | 10 +++++----- test/testmemleak.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/checkmemoryleak.cpp b/lib/checkmemoryleak.cpp index 0b13000a4..38e8c804d 100644 --- a/lib/checkmemoryleak.cpp +++ b/lib/checkmemoryleak.cpp @@ -2590,8 +2590,8 @@ void CheckMemoryLeakStructMember::checkStructVariable(const Variable * const var // Struct member is allocated => check if it is also properly deallocated.. else if (Token::Match(tok2->previous(), "[;{}] %varid% . %var% = malloc|strdup|kmalloc (", variable->varId()) - || Token::Match(tok2->previous(), "[;{}] %varid% . %var% = new ", variable->varId()) - || Token::Match(tok2->previous(), "[;{}] %varid% . %var% = fopen (", variable->varId())) { + || Token::Match(tok2->previous(), "[;{}] %varid% . %var% = new ", variable->varId()) + || Token::Match(tok2->previous(), "[;{}] %varid% . %var% = fopen (", variable->varId())) { const unsigned int structid(variable->varId()); const unsigned int structmemberid(tok2->tokAt(2)->varId()); @@ -2611,9 +2611,9 @@ void CheckMemoryLeakStructMember::checkStructVariable(const Variable * const var // Deallocating the struct member.. else if (Token::Match(tok3, "free|kfree ( %var% . %varid% )", structmemberid) - || Token::Match(tok3, "delete %var% . %varid%", structmemberid) - || Token::Match(tok3, "delete [ ] %var% . %varid%", structmemberid) - || Token::Match(tok3, "fclose ( %var% . %varid%", structmemberid)) { + || Token::Match(tok3, "delete %var% . %varid%", structmemberid) + || Token::Match(tok3, "delete [ ] %var% . %varid%", structmemberid) + || Token::Match(tok3, "fclose ( %var% . %varid%", structmemberid)) { // If the deallocation happens at the base level, don't check this member anymore if (indentlevel3 == 0) break; diff --git a/test/testmemleak.cpp b/test/testmemleak.cpp index 51a41fddc..c1990ab99 100644 --- a/test/testmemleak.cpp +++ b/test/testmemleak.cpp @@ -5325,7 +5325,7 @@ private: // Ticket #933 Leaks with struct members not detected void localvars() { - // Test error case + // Test error case const char code_err[] = "struct A {\n" " FILE* f;\n" " char* c;\n"