Skip to content

Commit cf75e2b

Browse files
committed
astyle formatting
1 parent 47ef8cf commit cf75e2b

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/checkmemoryleak.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,8 +2590,8 @@ void CheckMemoryLeakStructMember::checkStructVariable(const Variable * const var
25902590

25912591
// Struct member is allocated => check if it is also properly deallocated..
25922592
else if (Token::Match(tok2->previous(), "[;{}] %varid% . %var% = malloc|strdup|kmalloc (", variable->varId())
2593-
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = new ", variable->varId())
2594-
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = fopen (", variable->varId())) {
2593+
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = new ", variable->varId())
2594+
|| Token::Match(tok2->previous(), "[;{}] %varid% . %var% = fopen (", variable->varId())) {
25952595
const unsigned int structid(variable->varId());
25962596
const unsigned int structmemberid(tok2->tokAt(2)->varId());
25972597

@@ -2611,9 +2611,9 @@ void CheckMemoryLeakStructMember::checkStructVariable(const Variable * const var
26112611

26122612
// Deallocating the struct member..
26132613
else if (Token::Match(tok3, "free|kfree ( %var% . %varid% )", structmemberid)
2614-
|| Token::Match(tok3, "delete %var% . %varid%", structmemberid)
2615-
|| Token::Match(tok3, "delete [ ] %var% . %varid%", structmemberid)
2616-
|| Token::Match(tok3, "fclose ( %var% . %varid%", structmemberid)) {
2614+
|| Token::Match(tok3, "delete %var% . %varid%", structmemberid)
2615+
|| Token::Match(tok3, "delete [ ] %var% . %varid%", structmemberid)
2616+
|| Token::Match(tok3, "fclose ( %var% . %varid%", structmemberid)) {
26172617
// If the deallocation happens at the base level, don't check this member anymore
26182618
if (indentlevel3 == 0)
26192619
break;

test/testmemleak.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5325,7 +5325,7 @@ class TestMemleakStructMember : public TestFixture {
53255325

53265326
// Ticket #933 Leaks with struct members not detected
53275327
void localvars() {
5328-
// Test error case
5328+
// Test error case
53295329
const char code_err[] = "struct A {\n"
53305330
" FILE* f;\n"
53315331
" char* c;\n"

0 commit comments

Comments
 (0)