Compute value earlier and reuse it
This commit is contained in:
parent
7308901add
commit
9fdfada4b5
|
@ -202,9 +202,8 @@ void CheckIO::checkFileUsage()
|
|||
operation = Filepointer::OPEN;
|
||||
} else if ((tok->str() == "rewind" || tok->str() == "fseek" || tok->str() == "fsetpos" || tok->str() == "fflush") ||
|
||||
(windows && tok->str() == "_fseeki64")) {
|
||||
if (printPortability && tok->str() == "fflush") {
|
||||
fileTok = tok->tokAt(2);
|
||||
if (fileTok) {
|
||||
if (printPortability && fileTok && tok->str() == "fflush") {
|
||||
if (fileTok->str() == "stdin")
|
||||
fflushOnInputStreamError(tok, fileTok->str());
|
||||
else {
|
||||
|
@ -213,9 +212,6 @@ void CheckIO::checkFileUsage()
|
|||
fflushOnInputStreamError(tok, fileTok->str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fileTok = tok->tokAt(2);
|
||||
operation = Filepointer::POSITIONING;
|
||||
} else if (tok->str() == "fgetc" || tok->str() == "fgetwc" ||
|
||||
tok->str() == "fgets" || tok->str() == "fgetws" || tok->str() == "fread" ||
|
||||
|
|
Loading…
Reference in New Issue