From 9ae9ffa9bef21197fd6e43e47ffcce593a6f8b67 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sun, 24 May 2009 03:45:14 +0700 Subject: [PATCH] src/checkmemoryleak.cpp(GetAllocationType): simplify condition a bit. Replace two Token::simpleMatch() calls to one Token::Match(). Correction for my previous (2654a4aa54457f71b5dbcdc43ee714a054e65069) commit. No functional change. --- src/checkmemoryleak.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checkmemoryleak.cpp b/src/checkmemoryleak.cpp index 19cbeede1..6011f47e8 100644 --- a/src/checkmemoryleak.cpp +++ b/src/checkmemoryleak.cpp @@ -116,7 +116,7 @@ CheckMemoryLeakClass::AllocType CheckMemoryLeakClass::GetAllocationType(const To if (Token::simpleMatch(tok2, "popen (")) return Pipe; - if (Token::simpleMatch(tok2, "opendir (") || Token::simpleMatch(tok2, "fdopendir (")) + if (Token::Match(tok2, "opendir|fdopendir (")) return Dir; // Userdefined allocation function..