From d4e1379505daf7372a344f797bd9ea4c67164d0e Mon Sep 17 00:00:00 2001 From: lnd3 Date: Sat, 9 Nov 2024 19:32:27 +0100 Subject: [PATCH] Minor fixes. --- packages/network/source/common/NetworkConnection.cpp | 1 - packages/storage/include/storage/SequentialCache.h | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/network/source/common/NetworkConnection.cpp b/packages/network/source/common/NetworkConnection.cpp index 4a624dbe..08dd4002 100644 --- a/packages/network/source/common/NetworkConnection.cpp +++ b/packages/network/source/common/NetworkConnection.cpp @@ -231,7 +231,6 @@ namespace l::network { } size_t sentBytes = 0; auto res = curl_ws_send(mCurl, buffer, size, &sentBytes, 0, CURLWS_TEXT); - ASSERT(sentBytes == size); if (res != CURLE_OK) { LOG(LogError) << "Failed wss write, error: " << res; } diff --git a/packages/storage/include/storage/SequentialCache.h b/packages/storage/include/storage/SequentialCache.h index 78388455..0892e9e4 100644 --- a/packages/storage/include/storage/SequentialCache.h +++ b/packages/storage/include/storage/SequentialCache.h @@ -291,7 +291,7 @@ namespace l::filecache { break; } } - if (static_cast(beginPosition + cacheBlockWidth) >= l::math::constants::INTMAX) { + if (static_cast(beginPosition) + cacheBlockWidth >= l::math::constants::INTMAX) { break; } beginPosition += cacheBlockWidth; @@ -305,7 +305,7 @@ namespace l::filecache { break; } } - if (static_cast(beginPosition - cacheBlockWidth) <= l::math::constants::INTMIN) { + if (static_cast(beginPosition) - cacheBlockWidth<= l::math::constants::INTMIN) { break; } beginPosition -= cacheBlockWidth; @@ -370,7 +370,7 @@ namespace l::filecache { break; } } - if (static_cast(beginPosition + cacheBlockWidth1) >= l::math::constants::INTMAX) { + if (static_cast(beginPosition) + cacheBlockWidth1 >= l::math::constants::INTMAX) { break; } beginPosition += cacheBlockWidth1; @@ -387,7 +387,7 @@ namespace l::filecache { break; } } - if (static_cast(beginPosition - cacheBlockWidth1) <= l::math::constants::INTMIN) { + if (static_cast(beginPosition) - cacheBlockWidth1 <= l::math::constants::INTMIN) { break; } beginPosition -= cacheBlockWidth1;