Skip to content

Commit

Permalink
Fix build error on non windows plateforms
Browse files Browse the repository at this point in the history
  • Loading branch information
guhetier committed Feb 1, 2025
1 parent 52633e7 commit 3d390da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/recv_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ QuicRecvBufferProvideChunks(
NewBufferLength += Chunk->AllocLength;
}

Check warning on line 215 in src/core/recv_buffer.c

View check run for this annotation

Codecov / codecov/patch

src/core/recv_buffer.c#L209-L215

Added lines #L209 - L215 were not covered by tests

if (NewBufferLength > MAXUINT32) {
if (NewBufferLength > UINT32_MAX) {

Check warning on line 217 in src/core/recv_buffer.c

View check run for this annotation

Codecov / codecov/patch

src/core/recv_buffer.c#L217

Added line #L217 was not covered by tests
//
// We can't handle that much buffer space.
//
Expand Down Expand Up @@ -982,7 +982,11 @@ QuicRecvBufferRead(
Link);

Chunk->ExternalReference = TRUE;
uint32_t ChunkReadLength = (uint32_t)min(Chunk->AllocLength, remainingDataToRead);
uint32_t ChunkReadLength =

Check warning on line 985 in src/core/recv_buffer.c

View check run for this annotation

Codecov / codecov/patch

src/core/recv_buffer.c#L984-L985

Added lines #L984 - L985 were not covered by tests
(uint32_t)(Chunk->AllocLength < remainingDataToRead ?
Chunk->AllocLength :
remainingDataToRead);

Buffers[*BufferCount].Buffer = Chunk->Buffer;
Buffers[*BufferCount].Length = ChunkReadLength;
remainingDataToRead -= ChunkReadLength;
Expand Down

0 comments on commit 3d390da

Please sign in to comment.