Replace a few more cases of INT_MAX
This commit is contained in:
parent
e49addc585
commit
43a574ac62
1 changed files with 4 additions and 4 deletions
|
@ -1348,8 +1348,8 @@ int file_size(const std::string& fname)
|
|||
if(ec) {
|
||||
LOG_FS << "Failed to read filesize of " << fname << ": " << ec.message();
|
||||
return -1;
|
||||
} else if(size > INT_MAX) {
|
||||
return INT_MAX;
|
||||
} else if(size > std::numeric_limits<int>::max()) {
|
||||
return std::numeric_limits<int>::max();
|
||||
} else {
|
||||
return size;
|
||||
}
|
||||
|
@ -1369,8 +1369,8 @@ int dir_size(const std::string& pname)
|
|||
if(ec) {
|
||||
LOG_FS << "Failed to read directorysize of " << pname << ": " << ec.message();
|
||||
return -1;
|
||||
} else if(size_sum > INT_MAX) {
|
||||
return INT_MAX;
|
||||
} else if(size_sum > std::numeric_limits<int>::max()) {
|
||||
return std::numeric_limits<int>::max();
|
||||
} else {
|
||||
return size_sum;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue