Update src/Disks/IVolume.cpp

Co-authored-by: Sergei Trifonov <sergei@clickhouse.com>
This commit is contained in:
Alexey Milovidov 2023-07-04 22:57:39 +03:00 committed by GitHub
parent 6345879cdf
commit 5a32995726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ IVolume::IVolume(
std::optional<UInt64> IVolume::getMaxUnreservedFreeSpace() const
{
std::optional<UInt64> res = 0;
std::optional<UInt64> res;
for (const auto & disk : disks)
res = std::max(res, disk->getUnreservedSpace());
return res;