Skip to content

Commit 401d8a4

Browse files
committed
apply suggestion
1 parent 6f2e969 commit 401d8a4

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/cppcheck.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2089,8 +2089,7 @@ unsigned int CppCheck::analyseWholeProgram(const std::string &buildDir, const st
20892089
// cppcheck-suppress shadowFunction - TODO: fix this
20902090
for (const Check *check : Check::instances()) {
20912091
if (checkClassAttr == check->name()) {
2092-
Check::FileInfo* fi = check->loadFileInfoFromXml(e);
2093-
if (fi) {
2092+
if (Check::FileInfo* fi = check->loadFileInfoFromXml(e)) {
20942093
fi->file0 = filesTxtInfo.sourceFile;
20952094
fileInfoList.push_back(fi);
20962095
}

0 commit comments

Comments
 (0)