Merge pull request #19639 from k0tran/master

Force LoongArchCPUInfoParser::TotalLogicalCount() to always return
This commit is contained in:
Henrik Rydgård 2024-11-19 19:12:43 +01:00 committed by GitHub
commit 489db6b92c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,15 +94,11 @@ int LoongArchCPUInfoParser::TotalLogicalCount() {
int low, high, found;
std::getline(presentFile, line);
found = sscanf(line.c_str(), "%d-%d", &low, &high);
if (found == 1){
return 1;
}
if (found == 2){
return high - low + 1;
}
}else{
return 1;
}
return 1;
}
#endif