fixup! fix: sonarcloud warnings (#2260) (#2263)

the scope of the buf variable was narrowed too far
This commit is contained in:
Charles Kerr 2021-12-03 17:20:39 -06:00 committed by GitHub
parent 2977636d58
commit e5e11e3c83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -729,7 +729,8 @@ static uint64_t loadFromFile(tr_torrent* tor, uint64_t fieldsToLoad, bool* didRe
std::string const filename = getResumeFilename(tor, TR_METAINFO_BASENAME_HASH);
if (auto buf = std::vector<char>{}; !tr_loadFile(buf, filename.c_str(), &error) ||
auto buf = std::vector<char>{};
if (!tr_loadFile(buf, filename.c_str(), &error) ||
!tr_variantFromBuf(
&top,
TR_VARIANT_PARSE_BENC | TR_VARIANT_PARSE_INPLACE,