Skip to content

Commit 8331d31

Browse files
authored
Update astutils.cpp
In this case `tok` will always true, because it checked earlier: ``` if (!tok) return false; ```
1 parent 3089352 commit 8331d31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/astutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ bool isVariableChangedByFunctionCall(const Token *tok, const Settings *settings,
404404
return false;
405405

406406
// address of variable
407-
const bool addressOf = tok && Token::simpleMatch(tok->previous(), "&");
407+
const bool addressOf = Token::simpleMatch(tok->previous(), "&");
408408

409409
// passing variable to subfunction?
410410
if (Token::Match(tok->tokAt(-2), ") & %name% [,)]") && Token::Match(tok->linkAt(-2)->previous(), "[,(] ("))

0 commit comments

Comments
 (0)