Skip to content

Commit b61eaec

Browse files
committed
Cppcheck self-check; use Token::simpleMatch
1 parent 4cccc71 commit b61eaec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkuninitvar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ const Token* CheckUninitVar::isVariableUsage(const Token *vartok, bool pointer,
11221122
derefValue = valueExpr;
11231123
while (Token::Match(derefValue->astParent(), "+|-|*|[|.") ||
11241124
(derefValue->astParent() && derefValue->astParent()->isCast()) ||
1125-
(deref < arrayDim && Token::Match(derefValue->astParent(), "&") && derefValue->astParent()->isBinaryOp())) {
1125+
(deref < arrayDim && Token::simpleMatch(derefValue->astParent(), "&") && derefValue->astParent()->isBinaryOp())) {
11261126
const Token * const derefValueParent = derefValue->astParent();
11271127
if (derefValueParent->str() == "*") {
11281128
if (derefValueParent->isUnaryOp("*"))

0 commit comments

Comments
 (0)