Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuscu committed Nov 9, 2024
1 parent 3f8d98c commit d4e1379
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/network/source/common/NetworkConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions packages/storage/include/storage/SequentialCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ namespace l::filecache {
break;
}
}
if (static_cast<int64_t>(beginPosition + cacheBlockWidth) >= l::math::constants::INTMAX) {
if (static_cast<int64_t>(beginPosition) + cacheBlockWidth >= l::math::constants::INTMAX) {
break;
}
beginPosition += cacheBlockWidth;
Expand All @@ -305,7 +305,7 @@ namespace l::filecache {
break;
}
}
if (static_cast<int64_t>(beginPosition - cacheBlockWidth) <= l::math::constants::INTMIN) {
if (static_cast<int64_t>(beginPosition) - cacheBlockWidth<= l::math::constants::INTMIN) {
break;
}
beginPosition -= cacheBlockWidth;
Expand Down Expand Up @@ -370,7 +370,7 @@ namespace l::filecache {
break;
}
}
if (static_cast<int64_t>(beginPosition + cacheBlockWidth1) >= l::math::constants::INTMAX) {
if (static_cast<int64_t>(beginPosition) + cacheBlockWidth1 >= l::math::constants::INTMAX) {
break;
}
beginPosition += cacheBlockWidth1;
Expand All @@ -387,7 +387,7 @@ namespace l::filecache {
break;
}
}
if (static_cast<int64_t>(beginPosition - cacheBlockWidth1) <= l::math::constants::INTMIN) {
if (static_cast<int64_t>(beginPosition) - cacheBlockWidth1 <= l::math::constants::INTMIN) {
break;
}
beginPosition -= cacheBlockWidth1;
Expand Down

0 comments on commit d4e1379

Please sign in to comment.