Null pointer: cleanup the code. Ticket: #2642
This commit is contained in:
parent
bc3507118d
commit
266d1cc4d3
|
@ -607,10 +607,6 @@ void CheckNullPointer::nullPointerByCheckAndDeRef()
|
||||||
const Token *vartok = 0;
|
const Token *vartok = 0;
|
||||||
if (Token::Match(tok, "if ( ! %var% )|&&"))
|
if (Token::Match(tok, "if ( ! %var% )|&&"))
|
||||||
vartok = tok->tokAt(3);
|
vartok = tok->tokAt(3);
|
||||||
else if (Token::Match(tok, "if ( NULL|0 == %var% )|&&"))
|
|
||||||
vartok = tok->tokAt(4);
|
|
||||||
else if (Token::Match(tok, "if ( %var% == NULL|0 )|&&"))
|
|
||||||
vartok = tok->tokAt(2);
|
|
||||||
else if (Token::Match(tok, "if|while ( %var% )|&&"))
|
else if (Token::Match(tok, "if|while ( %var% )|&&"))
|
||||||
vartok = tok->tokAt(2);
|
vartok = tok->tokAt(2);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue