From 0a1b8c22d6cfe5a4af33d4b6e485c442ce411f1a Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Tue, 9 Sep 2014 13:11:41 +0400 Subject: [PATCH] Simplify null pointer handling --- lib/checkuninitvar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkuninitvar.cpp b/lib/checkuninitvar.cpp index ef9ac9e12..c08ada579 100644 --- a/lib/checkuninitvar.cpp +++ b/lib/checkuninitvar.cpp @@ -1864,7 +1864,7 @@ bool CheckUninitVar::isMemberVariableAssignment(const Token *tok, const std::str return false; } - else if (Token::simpleMatch(ftok ? ftok->previous() : nullptr, "= * (")) + else if (ftok && Token::simpleMatch(ftok->previous(), "= * (")) return false; } return true;