diff --git a/lib/checknullpointer.cpp b/lib/checknullpointer.cpp index 916fdfacc..193711ea7 100644 --- a/lib/checknullpointer.cpp +++ b/lib/checknullpointer.cpp @@ -766,8 +766,7 @@ void CheckNullPointer::nullConstantDereference() else if (Token::simpleMatch(tok, "* 0")) { - if (Token::Match(tok->previous(), "[<>;{}=+-*/(,]") || - Token::Match(tok->previous(), "return|<<")) + if (Token::Match(tok->previous(), "return|;|{|}|=|(|,|%op%")) { nullPointerError(tok); }